aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/SetEnv.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-11 03:05:02 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-11 03:05:02 +0300
commitf5f056d79087f4ee3038643d02a82c1ad574553f (patch)
tree7d0313a1cddfe7be70378844d9b6bc487982c65d /app/SetEnv.hs
parentcode style (diff)
downloadwindows-env-f5f056d79087f4ee3038643d02a82c1ad574553f.tar.gz
windows-env-f5f056d79087f4ee3038643d02a82c1ad574553f.zip
refactoring
The fact whether the registry value was a regular or an expandable string is now propagated up to the `Environment` module (and even further to the apps). This was done to get rid of these weird `setString*` functions (and the like). I don't feel like I've came up with the right abstractions yet though, so there's more work on this to come.
Diffstat (limited to '')
-rw-r--r--app/SetEnv.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/SetEnv.hs b/app/SetEnv.hs
index 5948d3e..bb058d8 100644
--- a/app/SetEnv.hs
+++ b/app/SetEnv.hs
@@ -22,7 +22,7 @@ data Options = Options
{ optYes :: Bool
, optGlobal :: Bool
, optName :: WindowsEnv.VarName
- , optValue :: WindowsEnv.VarValue
+ , optValue :: String
} deriving (Eq, Show)
optionParser :: Parser Options
@@ -67,6 +67,6 @@ setEnv options = runExceptT doSetEnv >>= either ioError return
| skipPrompt = withoutPrompt
| otherwise = withPrompt $ newMessage profile varName varValue
- engrave = WindowsEnv.engraveForce profile varName varValue
+ engrave = WindowsEnv.engrave profile varName $ WindowsEnv.VarValue False varValue
doSetEnv = void $ promptAnd engrave