From e658965b261237ac67c37e4092ae30eb51a8ea84 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Thu, 2 Nov 2023 01:27:46 +0100 Subject: [PATCH] Exact search and Source winget --- Winget-AutoUpdate/functions/Update-App.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Winget-AutoUpdate/functions/Update-App.ps1 b/Winget-AutoUpdate/functions/Update-App.ps1 index 95927f1..cdd8d17 100644 --- a/Winget-AutoUpdate/functions/Update-App.ps1 +++ b/Winget-AutoUpdate/functions/Update-App.ps1 @@ -30,12 +30,12 @@ Function Update-App ($app) { #Run Winget Upgrade command if ($ModsOverride) { - Write-ToLog "-> Running (overriding default): Winget upgrade --id $($app.Id) --accept-package-agreements --accept-source-agreements --override $ModsOverride" - & $Winget upgrade --id $($app.Id) --accept-package-agreements --accept-source-agreements --override $ModsOverride | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append + Write-ToLog "-> Running (overriding default): Winget upgrade --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h --override $ModsOverride" + & $Winget upgrade --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h --override $ModsOverride | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append } else { - Write-ToLog "-> Running: Winget upgrade --id $($app.Id) --accept-package-agreements --accept-source-agreements -h" - & $Winget upgrade --id $($app.Id) --accept-package-agreements --accept-source-agreements -h | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append + Write-ToLog "-> Running: Winget upgrade --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h" + & $Winget upgrade --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append } if ($ModsUpgrade) { @@ -61,12 +61,12 @@ Function Update-App ($app) { Write-ToLog "-> An upgrade for $($app.Name) failed, now trying an install instead..." "Yellow" if ($ModsOverride) { - Write-ToLog "-> Running (overriding default): Winget install --id $($app.Id) --accept-package-agreements --accept-source-agreements --force --override $ModsOverride" - & $Winget install --id $($app.Id) --accept-package-agreements --accept-source-agreements --force --override $ModsOverride | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append + Write-ToLog "-> Running (overriding default): Winget install --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h --force --override $ModsOverride" + & $Winget install --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h --force --override $ModsOverride | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append } else { - Write-ToLog "-> Running: Winget install --id $($app.Id) --accept-package-agreements --accept-source-agreements --force -h" - & $Winget install --id $($app.Id) --accept-package-agreements --accept-source-agreements --force -h | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append + Write-ToLog "-> Running: Winget install --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h --force" + & $Winget install --id $($app.Id) -e --accept-package-agreements --accept-source-agreements -s winget -h --force | Where-Object { $_ -notlike " *" } | Tee-Object -file $LogFile -Append } if ($ModsInstall) {