Merge pull request #41 from Romanitho/fix

Update Get-WingetOutdatedApps.ps1
pull/46/head
Romain 2022-04-08 00:15:44 +02:00 committed by GitHub
commit 221953687e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -14,8 +14,9 @@ function Get-WingetOutdatedApps {
}
#Get Winget Location in User context
$WingetCmd = Get-Command winget.exe -ErrorAction SilentlyContinue
if ($WingetCmd){
$Script:Winget = (Get-Command winget.exe -ErrorAction SilentlyContinue).Source
$Script:Winget = $WingetCmd.Source
}
#Get Winget Location in System context (WinGet < 1.17)
elseif (Test-Path "$WingetPath\AppInstallerCLI.exe"){