aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-12-13 03:20:58 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-12-13 03:20:58 +0300
commit1ab0697d268c27a0d7871e0f6bcb6ba1a165fb77 (patch)
tree5e36eec58bf32ded1a266d8310c1ada3265db0e1 /src
parentbugfix (withPrompt no longer swallows IOError) (diff)
downloadwindows-env-1ab0697d268c27a0d7871e0f6bcb6ba1a165fb77.tar.gz
windows-env-1ab0697d268c27a0d7871e0f6bcb6ba1a165fb77.zip
setenv: prompt message update
It also now uncoditionally overrides variables (i.e. even when the corresponding registy values are not strings).
Diffstat (limited to 'src')
-rw-r--r--src/Windows/Environment.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Windows/Environment.hs b/src/Windows/Environment.hs
index 859667e..d44b291 100644
--- a/src/Windows/Environment.hs
+++ b/src/Windows/Environment.hs
@@ -14,6 +14,7 @@ module Windows.Environment
, VarValue
, query
, engrave
+ , engraveForce
, wipe
, pathJoin
@@ -54,6 +55,12 @@ engrave profile name value = do
lift notifyEnvironmentUpdate
return ret
+engraveForce :: Profile -> VarName -> VarValue -> ExceptT IOError IO ()
+engraveForce profile name value = do
+ ret <- Registry.setString (profileKeyPath profile) name value
+ lift notifyEnvironmentUpdate
+ return ret
+
wipe :: Profile -> VarName -> ExceptT IOError IO ()
wipe profile name = do
ret <- Registry.deleteValue (profileKeyPath profile) name