aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apps/AddPath.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-12-12 11:26:09 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-12-12 11:26:09 +0300
commitf137d82adf8b02db3519c018373b18059bac486e (patch)
tree8f14a6079f8357d56f9b9450a038d6f64bffe9c4 /apps/AddPath.hs
parentrefactoring (diff)
downloadwindows-env-f137d82adf8b02db3519c018373b18059bac486e.tar.gz
windows-env-f137d82adf8b02db3519c018373b18059bac486e.zip
refactoring
Diffstat (limited to 'apps/AddPath.hs')
-rw-r--r--apps/AddPath.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/AddPath.hs b/apps/AddPath.hs
index 9f9a5b1..a32244c 100644
--- a/apps/AddPath.hs
+++ b/apps/AddPath.hs
@@ -52,7 +52,7 @@ main = execParser parser >>= addPath
addPath :: Options -> IO ()
addPath options = do
- oldValue <- Env.query profile varName >>= emptyIfNotFound
+ oldValue <- Env.query profile varName >>= emptyIfMissing
let oldPaths = Env.pathSplit oldValue
let newPaths = oldPaths `union` pathsToAdd
when (length oldPaths /= length newPaths) $ do
@@ -73,7 +73,7 @@ addPath options = do
skipPrompt = optYes options
- emptyIfNotFound (Left e)
+ emptyIfMissing (Left e)
| isDoesNotExistError e = return ""
| otherwise = ioError e
- emptyIfNotFound (Right s) = return s
+ emptyIfMissing (Right s) = return s