From e6f1df641a280a84d45411bd098539fee8802fd3 Mon Sep 17 00:00:00 2001 From: Iristyle Date: Sun, 14 Jul 2013 14:29:01 -0400 Subject: [PATCH] feat: added uninstall for DartEditor --- DartEditor/tools/chocolateyUninstall.ps1 | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 DartEditor/tools/chocolateyUninstall.ps1 diff --git a/DartEditor/tools/chocolateyUninstall.ps1 b/DartEditor/tools/chocolateyUninstall.ps1 new file mode 100644 index 0000000..c78e503 --- /dev/null +++ b/DartEditor/tools/chocolateyUninstall.ps1 @@ -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 +}