Show messages if packages are installed
This commit is contained in:
parent
64fe00e42f
commit
e9be3db64e
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue