ansible/test/integration/targets/win_chocolatey/files/tools/chocolateyUninstall.ps1
Jordan Borean 93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
2018-07-24 07:52:13 +10:00

9 lines
282 B
PowerShell

$ErrorActionPreference = 'Stop'
$package_name = $env:ChocolateyPackageName
$package_version = $env:ChocolateyPackageVersion
$install_path = "--- PATH ---\$package_name-$package_version.txt"
if (Test-Path -Path $install_path) {
Remove-Item -Path $install_path -Force > $null
}