Fix 'Get Installed' for multiple-dependency apps (#835)

This commit is contained in:
Aaron 2023-06-14 22:43:02 +01:00 committed by GitHub
parent a30b81eb9e
commit d88e6c40d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -26,8 +26,12 @@ Function Invoke-WinUtilCurrentSystem {
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"} $filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"}
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object { $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {
if($sync.configs.applications.$($psitem.Key).winget -in $sync.InstalledPrograms.Id){ $dependencies = $($sync.configs.applications.$($psitem.Key).winget -split ";")
Write-Output $psitem.name
Foreach ($dependency in $dependencies) {
if($dependency -in $sync.InstalledPrograms.Id){
Write-Output $psitem.name
}
} }
} }
} }

View File

@ -367,8 +367,12 @@ Function Invoke-WinUtilCurrentSystem {
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"} $filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"}
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object { $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {
if($sync.configs.applications.$($psitem.Key).winget -in $sync.InstalledPrograms.Id){ $dependencies = $($sync.configs.applications.$($psitem.Key).winget -split ";")
Write-Output $psitem.name
Foreach ($dependency in $dependencies) {
if($dependency -in $sync.InstalledPrograms.Id){
Write-Output $psitem.name
}
} }
} }
} }