From 1ab0697d268c27a0d7871e0f6bcb6ba1a165fb77 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 13 Dec 2016 03:20:58 +0300 Subject: setenv: prompt message update It also now uncoditionally overrides variables (i.e. even when the corresponding registy values are not strings). --- src/Windows/Environment.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Windows') 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 -- cgit v1.2.3