diff --git a/scripts/Common/Scripts/Software.ps1 b/scripts/Common/Scripts/Software.ps1 index ea4b91b1..e184d9f6 100644 --- a/scripts/Common/Scripts/Software.ps1 +++ b/scripts/Common/Scripts/Software.ps1 @@ -32,7 +32,10 @@ $null = New-Module { if (-not ($Force.IsPresent)) { for ($i = $Names.Count - 1; $i -ge 0; $i--) { - if (Test-ChocoPackage $Names[$i]) { + $name = $Names[$i]; + + if (Test-ChocoPackage $name) { + Write-Host "Package ``$name`` is already installed" $Names.RemoveAt($i); } } @@ -64,6 +67,8 @@ $null = New-Module { --source winget ` --scope machine ` --exact --id $name; + } else { + Write-Host "Package ``$name`` is already installed" } } }