diff options
Diffstat (limited to 'app/UnsetEnv.hs')
-rw-r--r-- | app/UnsetEnv.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/UnsetEnv.hs b/app/UnsetEnv.hs index 02df1a1..b841f86 100644 --- a/app/UnsetEnv.hs +++ b/app/UnsetEnv.hs @@ -50,17 +50,15 @@ unsetEnv :: Options -> IO () unsetEnv options = runExceptT doUnsetEnv >>= either ioError return where varName = optName options - forAllUsers = optGlobal options + skipPrompt = optYes options + profile | forAllUsers = WindowsEnv.AllUsers | otherwise = WindowsEnv.CurrentUser - skipPrompt = optYes options + doUnsetEnv = void $ promptAnd $ WindowsEnv.wipe profile varName + promptAnd | skipPrompt = withoutPrompt | otherwise = withPrompt $ wipeMessage profile varName - - wipe = WindowsEnv.wipe profile varName - - doUnsetEnv = void $ promptAnd wipe |