diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-12 04:07:30 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-12 04:07:30 +0300 |
commit | f446a04e4100ed52e9d100e8e9705d358943a4ec (patch) | |
tree | 40ce78f56691dd85fe98b406b7de1b2c3b1d7551 /app/RemovePath.hs | |
parent | setenv: crap, another bug (diff) | |
download | windows-env-f446a04e4100ed52e9d100e8e9705d358943a4ec.tar.gz windows-env-f446a04e4100ed52e9d100e8e9705d358943a4ec.zip |
refactoring
Diffstat (limited to '')
-rw-r--r-- | app/RemovePath.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/RemovePath.hs b/app/RemovePath.hs index a8bf56d..56ea66f 100644 --- a/app/RemovePath.hs +++ b/app/RemovePath.hs @@ -72,7 +72,8 @@ removePath options = runExceptT doRemovePath >>= either ioError return removePathFrom profile = do oldValue <- WindowsEnv.query profile varName let expandable = WindowsEnv.valueExpandable oldValue - let split = WindowsEnv.pathSplit $ WindowsEnv.valueString oldValue + let joined = WindowsEnv.valueString oldValue + let split = WindowsEnv.pathSplit joined let remaining = filter (flip notElem pathsToRemove) split when (length split /= length remaining) $ do let newValue = WindowsEnv.Value expandable (WindowsEnv.pathJoin remaining) |