aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apps/RemovePath.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-17 18:24:12 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-17 18:24:12 +0300
commitd854f16486913af7fb70e4ff251a29d5cf2d7323 (patch)
treecffae3dc6f90ff96da9b11ddc57d7bf43bc97ad1 /apps/RemovePath.hs
parentupdate project description (diff)
downloadwindows-env-d854f16486913af7fb70e4ff251a29d5cf2d7323.tar.gz
windows-env-d854f16486913af7fb70e4ff251a29d5cf2d7323.zip
refactoring
Diffstat (limited to 'apps/RemovePath.hs')
-rw-r--r--apps/RemovePath.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/RemovePath.hs b/apps/RemovePath.hs
index 8c2bcef..21b4ac6 100644
--- a/apps/RemovePath.hs
+++ b/apps/RemovePath.hs
@@ -64,9 +64,9 @@ removePath options = do
let newPaths = oldPaths \\ pathsToRemove
when (length oldPaths /= length newPaths) $ do
let newValue = Environment.pathJoin newPaths
- engrave env varName newValue
+ engrave env newValue
skipPrompt = optYes options
- engrave
- | skipPrompt = Environment.engrave
- | otherwise = Environment.engraveWithPrompt
+ engrave env value = if skipPrompt
+ then Environment.engrave env varName value
+ else Environment.engravePrompt env varName value >> return ()