Skip to content

Commit

Permalink
(#201) Working around bug in Chocolatey
Browse files Browse the repository at this point in the history
Looks like there is an issue here:

https://github.com/chocolatey/chocolatey/blob/master/src/helpers/functions/Uninstall-ChocolateyPackage.ps1#L51

The $file parameter is never passed into the call to msiexec, so it never knows which msi to call.
  • Loading branch information
gep13 committed Dec 24, 2014
1 parent c281bfb commit 0ba3c0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ChocolateyPackage/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ try {

$file = $properties.LocalPackage

Uninstall-ChocolateyPackage $packageName $fileType $silentArgs $file -validExitCodes $validExitCodes
# Would like to use the following, but looks like there is a bug in this method when uninstalling MSI's
# Uninstall-ChocolateyPackage $packageName $fileType $silentArgs $file -validExitCodes $validExitCodes

# Use this instead
$msiArgs = "/x $file $silentArgs";
Start-ChocolateyProcessAsAdmin "$msiArgs" 'msiexec' -validExitCodes $validExitCodes

Write-ChocolateySuccess $package
}
Expand Down

0 comments on commit 0ba3c0d

Please sign in to comment.