aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/SetEnv.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-12 04:07:30 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-12 04:07:30 +0300
commitf446a04e4100ed52e9d100e8e9705d358943a4ec (patch)
tree40ce78f56691dd85fe98b406b7de1b2c3b1d7551 /app/SetEnv.hs
parentsetenv: crap, another bug (diff)
downloadwindows-env-f446a04e4100ed52e9d100e8e9705d358943a4ec.tar.gz
windows-env-f446a04e4100ed52e9d100e8e9705d358943a4ec.zip
refactoring
Diffstat (limited to '')
-rw-r--r--app/SetEnv.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/SetEnv.hs b/app/SetEnv.hs
index e77b05a..6932198 100644
--- a/app/SetEnv.hs
+++ b/app/SetEnv.hs
@@ -56,14 +56,13 @@ setEnv options = runExceptT doSetEnv >>= either ioError return
where
varName = optName options
varValue = optValue options
-
forAllUsers = optGlobal options
+ skipPrompt = optYes options
+
profile
| forAllUsers = WindowsEnv.AllUsers
| otherwise = WindowsEnv.CurrentUser
- skipPrompt = optYes options
-
doSetEnv = do
expanded <- WindowsEnv.expand varValue
let expandable = expanded /= varValue