Function ReWrite?

This commit is contained in:
TheFlyingFool 2024-05-13 16:31:39 -05:00
parent d3b84021e4
commit b476c9238b

View File

@ -26,11 +26,11 @@ $settingsJson = @{installBehavior = @{
}
$settingsJson | ConvertTo-Json | Out-File $settingsPath -Encoding utf8
function InstallTheApps([array]$AppList) {
Foreach ($app in $AppList) {
function InstallTheApps() {
Foreach ($app in $apps) {
$listApp = winget list --exact -q $app.name
if (![String]::Join('', $listApp).Contains($app.name)) {
Write-Host 'Installing:' $app.name
if (![String]::Join("", $listApp).Contains($app.name)) {
Write-host "Installing:" $app.name
if ($null -ne $app.source) {
winget install --exact $app.name --source $app.source
# winget install --exact --silent $app.name --source $app.source
@ -41,7 +41,7 @@ function InstallTheApps([array]$AppList) {
}
}
else {
Write-Host 'Skipping Install of ' $app.name
Write-host "Skipping Install of " $app.name
}
}
}