aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apps/RemovePath.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-12-12 11:26:09 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-12-12 11:26:09 +0300
commitf137d82adf8b02db3519c018373b18059bac486e (patch)
tree8f14a6079f8357d56f9b9450a038d6f64bffe9c4 /apps/RemovePath.hs
parentrefactoring (diff)
downloadwindows-env-f137d82adf8b02db3519c018373b18059bac486e.tar.gz
windows-env-f137d82adf8b02db3519c018373b18059bac486e.zip
refactoring
Diffstat (limited to '')
-rw-r--r--apps/RemovePath.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/RemovePath.hs b/apps/RemovePath.hs
index 2956517..eb1cb00 100644
--- a/apps/RemovePath.hs
+++ b/apps/RemovePath.hs
@@ -63,7 +63,9 @@ removePath options = do
skipPrompt = optYes options
- removePathFrom profile = Env.query profile varName >>= either ignoreMissing (doRemovePathFrom profile)
+ removePathFrom profile = do
+ oldValue <- Env.query profile varName
+ either ignoreMissing (doRemovePathFrom profile) oldValue
ignoreMissing e
| isDoesNotExistError e = return ()