Show messages if packages are installed
This commit is contained in:
parent
64fe00e42f
commit
e9be3db64e
1 changed files with 6 additions and 1 deletions
|
@ -32,7 +32,10 @@ $null = New-Module {
|
||||||
|
|
||||||
if (-not ($Force.IsPresent)) {
|
if (-not ($Force.IsPresent)) {
|
||||||
for ($i = $Names.Count - 1; $i -ge 0; $i--) {
|
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);
|
$Names.RemoveAt($i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +67,8 @@ $null = New-Module {
|
||||||
--source winget `
|
--source winget `
|
||||||
--scope machine `
|
--scope machine `
|
||||||
--exact --id $name;
|
--exact --id $name;
|
||||||
|
} else {
|
||||||
|
Write-Host "Package ``$name`` is already installed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue