From 4d956c2e309bcfad585238a9727f4ca05dbf0a77 Mon Sep 17 00:00:00 2001 From: Vladimir Chebotarev Date: Mon, 12 Mar 2018 20:54:58 +0300 Subject: [PATCH] Checked if uninstaller removed its directory. (#2078) --- libexec/scoop-uninstall.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libexec/scoop-uninstall.ps1 b/libexec/scoop-uninstall.ps1 index add48b8c..09db9f72 100644 --- a/libexec/scoop-uninstall.ps1 +++ b/libexec/scoop-uninstall.ps1 @@ -73,8 +73,10 @@ $apps | ForEach-Object { try { Remove-Item -r $dir -ea stop -force } catch { - error "Couldn't remove '$(friendly_path $dir)'; it may be in use." - continue + if(test-path $dir) { + error "Couldn't remove '$(friendly_path $dir)'; it may be in use." + continue + } } # remove older versions