mirror of
https://github.com/wavetermdev/chocolatey.git
synced 2026-08-05 13:47:23 -07:00
remove unnecessary uninstall
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$packageArgs = @{
|
||||
packageName = $env:ChocolateyPackageName
|
||||
softwareName = 'Wave*'
|
||||
fileType = 'exe'
|
||||
silentArgs = '/S'
|
||||
validExitCodes= @(0)
|
||||
}
|
||||
|
||||
[array]$key = Get-UninstallRegistryKey -SoftwareName $packageArgs['softwareName']
|
||||
|
||||
if ($key.Count -eq 1) {
|
||||
$key | % {
|
||||
$packageArgs['file'] = "$($_.UninstallString)"
|
||||
|
||||
if ($packageArgs['fileType'] -eq 'MSI') {
|
||||
$packageArgs['silentArgs'] = "$($_.PSChildName) $($packageArgs['silentArgs'])"
|
||||
$packageArgs['file'] = ''
|
||||
} else {
|
||||
}
|
||||
|
||||
Uninstall-ChocolateyPackage @packageArgs
|
||||
}
|
||||
} elseif ($key.Count -eq 0) {
|
||||
Write-Warning "$packageName has already been uninstalled by other means."
|
||||
} elseif ($key.Count -gt 1) {
|
||||
Write-Warning "$($key.Count) matches found!"
|
||||
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
|
||||
Write-Warning "Please alert package maintainer the following keys were matched:"
|
||||
$key | % {Write-Warning "- $($_.DisplayName)"}
|
||||
}
|
||||
Reference in New Issue
Block a user