diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-12 17:10:29 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-12 17:10:29 +0300 |
commit | c7d5766463e5e99fcd2352c7177cf057c1971615 (patch) | |
tree | 04e2c34217dd498111965a17b9cafcb633ed5c13 /apps/AddPath.hs | |
parent | minimize stack.yaml (diff) | |
download | windows-env-c7d5766463e5e99fcd2352c7177cf057c1971615.tar.gz windows-env-c7d5766463e5e99fcd2352c7177cf057c1971615.zip |
refactoring
Diffstat (limited to 'apps/AddPath.hs')
-rw-r--r-- | apps/AddPath.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/AddPath.hs b/apps/AddPath.hs index 85f2aa4..5203723 100644 --- a/apps/AddPath.hs +++ b/apps/AddPath.hs @@ -44,11 +44,11 @@ addPath :: Options -> IO () addPath options = do missingPaths <- dropIncludedPaths $ paths options when (not $ null missingPaths) $ do - oldPath <- Environment.queryFromRegistry env $ name options - Environment.saveToRegistryWithPrompt env (name options) $ Environment.joinPaths $ missingPaths ++ [oldPath] + oldPath <- Environment.query env $ name options + Environment.engraveWithPrompt env (name options) $ Environment.pathJoin $ missingPaths ++ [oldPath] where dropIncludedPaths paths = do - currentPath <- Environment.getEnv $ name options - return $ filter (flip notElem $ Environment.splitPaths currentPath) paths - env | global options = Environment.AllUsersEnvironment - | otherwise = Environment.CurrentUserEnvironment + currentPath <- Environment.query env $ name options + return $ filter (flip notElem $ Environment.pathSplit currentPath) paths + env | global options = Environment.AllUsers + | otherwise = Environment.CurrentUser |