diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/AddPath.hs | 5 | ||||
-rw-r--r-- | apps/FixNtSymbolPath.hs | 5 | ||||
-rw-r--r-- | apps/SetEnv.hs | 5 | ||||
-rw-r--r-- | apps/UnsetEnv.hs | 5 |
4 files changed, 12 insertions, 8 deletions
diff --git a/apps/AddPath.hs b/apps/AddPath.hs index a3004a8..9c6c245 100644 --- a/apps/AddPath.hs +++ b/apps/AddPath.hs @@ -60,8 +60,9 @@ addPath options = do pathsToAdd = optPaths options forAllUsers = optGlobal options - env | forAllUsers = Environment.AllUsers - | otherwise = Environment.CurrentUser + env = if forAllUsers + then Environment.AllUsers + else Environment.CurrentUser query = Environment.query env varName diff --git a/apps/FixNtSymbolPath.hs b/apps/FixNtSymbolPath.hs index 14d3ea6..7138f94 100644 --- a/apps/FixNtSymbolPath.hs +++ b/apps/FixNtSymbolPath.hs @@ -70,8 +70,9 @@ fixNtSymbolPath options = do varName = "_NT_SYMBOL_PATH" forAllUsers = optGlobal options - env | forAllUsers = Environment.AllUsers - | otherwise = Environment.CurrentUser + env = if forAllUsers + then Environment.AllUsers + else Environment.CurrentUser query = Environment.query env varName diff --git a/apps/SetEnv.hs b/apps/SetEnv.hs index 54a3cde..3b88e7c 100644 --- a/apps/SetEnv.hs +++ b/apps/SetEnv.hs @@ -50,8 +50,9 @@ setEnv options = engrave varValue varValue = optValue options forAllUsers = optGlobal options - env | forAllUsers = Environment.AllUsers - | otherwise = Environment.CurrentUser + env = if forAllUsers + then Environment.AllUsers + else Environment.CurrentUser skipPrompt = optYes options engrave value = if skipPrompt diff --git a/apps/UnsetEnv.hs b/apps/UnsetEnv.hs index 6f47473..e4cbeac 100644 --- a/apps/UnsetEnv.hs +++ b/apps/UnsetEnv.hs @@ -44,8 +44,9 @@ unsetEnv options = wipe varName = optName options forAllUsers = optGlobal options - env | forAllUsers = Environment.AllUsers - | otherwise = Environment.CurrentUser + env = if forAllUsers + then Environment.AllUsers + else Environment.CurrentUser skipPrompt = optYes options wipe = if skipPrompt |