diff options
author | 2011-05-17 03:10:13 -0400 | |
---|---|---|
committer | 2011-05-17 03:13:11 -0400 | |
commit | c91929f6934fc4e94603d0fa004e824d5e2cfb65 (patch) | |
tree | e958f5b4dc1209afb90c786493164c351dea4b9a /Remote/Directory.hs | |
parent | 75a3f5027f74565d909fb940893636d081d9872a (diff) |
add whenM and unlessM
Just more golfing.. I am pretty sure something in a library somewhere can
do this, but I have been unable to find it.
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r-- | Remote/Directory.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 0cd3760d6..f69aa1256 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -62,8 +62,8 @@ directorySetup u c = do -- verify configuration is sane let dir = maybe (error "Specify directory=") id $ M.lookup "directory" c - e <- liftIO $ doesDirectoryExist dir - when (not e) $ error $ "Directory does not exist: " ++ dir + liftIO $ doesDirectoryExist dir + <|> error $ "Directory does not exist: " ++ dir c' <- encryptionSetup c -- The directory is stored in git config, not in this remote's |