Uninstall-ChocolateyPackage ignores -File value when -FileType is MSI
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
I'm pretty sure that line 65
$msiArgs = "/x"
should be something more like
$msiArgs = "/x $file"
Otherwise clients have to do something like
$env:chocolateyInstallOverride = "true"
$env:chocolateyInstallArguments = "$path /quiet"
Write-Debug "The current version of Chocolatey appears to contain a bug in Uninstall-ChocolateyPackage,"
Write-Debug "where the -File parameter value is ignored when -FileType is MSI."
Write-Debug "I bypass this by setting"
Write-Debug '$env:chocolateyInstallOverride = "true"'
Write-Debug '$env:chocolateyInstallArguments = "$path /quiet"'
Write-Debug "CType\chocolateyUninstall.ps1: running Uninstall-ChocolateyPackage -PackageName CType -FileType MSI
Contributor guide
Assessment
This issue has not been assessed yet.