feat: added uninstall for DartEditor
This commit is contained in:
28
DartEditor/tools/chocolateyUninstall.ps1
Normal file
28
DartEditor/tools/chocolateyUninstall.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
$package = 'DartEditor'
|
||||
|
||||
try {
|
||||
$location = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root
|
||||
if (!(Test-Path $location))
|
||||
{
|
||||
$location = Join-Path $Env:SystemDrive 'tools'
|
||||
}
|
||||
$location = Join-Path $location 'dart'
|
||||
|
||||
if (Test-Path $location)
|
||||
{
|
||||
Remove-Item $location -Recurse -Force
|
||||
}
|
||||
|
||||
Push-Location $Env:ChocolateyInstall\bin
|
||||
$batch = 'DartEditor.bat'
|
||||
if (Test-Path $batch)
|
||||
{
|
||||
Remove-Item $batch
|
||||
}
|
||||
Pop-Location
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
Reference in New Issue
Block a user