aboutsummaryrefslogtreecommitdiff
path: root/CmdLine/GitAnnexShell
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-05 15:00:50 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-05 15:00:50 -0400
commit236c467da19f34edb08f124e37fd26eb62c43fcf (patch)
treef4e488f77fb954812e4d48f399fc2ecab072afea /CmdLine/GitAnnexShell
parentf013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff)
more lambda-case conversion
Diffstat (limited to 'CmdLine/GitAnnexShell')
-rw-r--r--CmdLine/GitAnnexShell/Checks.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/CmdLine/GitAnnexShell/Checks.hs b/CmdLine/GitAnnexShell/Checks.hs
index 47bc11a76..fcbf14b24 100644
--- a/CmdLine/GitAnnexShell/Checks.hs
+++ b/CmdLine/GitAnnexShell/Checks.hs
@@ -21,12 +21,10 @@ checkNotReadOnly :: IO ()
checkNotReadOnly = checkEnv "GIT_ANNEX_SHELL_READONLY"
checkEnv :: String -> IO ()
-checkEnv var = do
- v <- getEnv var
- case v of
- Nothing -> noop
- Just "" -> noop
- Just _ -> giveup $ "Action blocked by " ++ var
+checkEnv var = getEnv var >>= \case
+ Nothing -> noop
+ Just "" -> noop
+ Just _ -> giveup $ "Action blocked by " ++ var
checkDirectory :: Maybe FilePath -> IO ()
checkDirectory mdir = do