Skip to content

Commit

Permalink
Update newApp.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
emadadel4 committed Nov 24, 2024
1 parent e70a85c commit 8a09cce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions newApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ function Download-Mthoed {

"API [Choco/Winget] Recommended" {

$choco = Read-Host "Enter choco package"

#Check -choco $choco
# Prompt the user for input
$choco = Read-Host "Enter Chocolatey package name"
$choco = ($choco -replace "choco install", "" -replace ",,", ",").Trim()

# Prompt the user for input
$winget = Read-Host "Enter winget package"

#Check -winget $winget

# Remove the string 'winget install -e --id' and any spaces from the input
$cleanedWinget = $winget -replace "winget install -e --id", "" -replace "\s+", ""

return @{
winget = $winget
winget = $cleanedWinget
choco = $choco
defaultEntry = $null
}
Expand Down Expand Up @@ -251,7 +251,7 @@ function Category {
# Write the ordered JSON to the file
$jsonOutput | ConvertTo-Json -Depth 20 | Out-File -FilePath $applications -Encoding utf8

Write-Host "Added successfully to existing JSON file. Don't forget to build and test it before commit" -ForegroundColor Green
Write-Host "Added successfully, Don't forget to build and test it before push commit" -ForegroundColor Green
}
else
{
Expand Down

0 comments on commit 8a09cce

Please sign in to comment.