feat: CasperJS 1.1-beta1
- builds on top of PhantomJS to ease scripting against Phantom
This commit is contained in:
28
CasperJS/tools/chocolateyUninstall.ps1
Normal file
28
CasperJS/tools/chocolateyUninstall.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
$package = 'CasperJS'
|
||||
|
||||
try {
|
||||
$installPath = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root
|
||||
if (!(Test-Path $installPath))
|
||||
{
|
||||
$installPath = Join-Path $Env:SystemDrive 'tools'
|
||||
}
|
||||
$installPath = Join-Path $installPath 'casperjs'
|
||||
|
||||
if (Test-Path $installPath)
|
||||
{
|
||||
Remove-Item $installPath -Recurse -Force
|
||||
}
|
||||
|
||||
$binLocation = $installPath -replace '\\', '\\'
|
||||
|
||||
$userPaths = [Environment]::GetEnvironmentVariable('Path', 'User') -split ';' |
|
||||
? { ($_ -notmatch $binLocation) -and (![String]::IsNullOrEmpty($_)) } |
|
||||
Select-Object -Unique
|
||||
|
||||
[Environment]::SetEnvironmentVariable('Path', ($userPaths -join ';'), 'User')
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
Reference in New Issue
Block a user