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,11 +26,15 @@ 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 ";")
Foreach ($dependency in $dependencies) {
if($dependency -in $sync.InstalledPrograms.Id){
Write-Output $psitem.name Write-Output $psitem.name
} }
} }
} }
}
if($CheckBox -eq "tweaks"){ if($CheckBox -eq "tweaks"){

View File

@ -367,11 +367,15 @@ 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 ";")
Foreach ($dependency in $dependencies) {
if($dependency -in $sync.InstalledPrograms.Id){
Write-Output $psitem.name Write-Output $psitem.name
} }
} }
} }
}
if($CheckBox -eq "tweaks"){ if($CheckBox -eq "tweaks"){