From 5fb6e3b804dccf5b727100eb139e289ad6bc0770 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 15 Oct 2012 23:12:50 -0400 Subject: simplify --- Git/CurrentRepo.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Git') diff --git a/Git/CurrentRepo.hs b/Git/CurrentRepo.hs index de11ce217..861df1b64 100644 --- a/Git/CurrentRepo.hs +++ b/Git/CurrentRepo.hs @@ -42,11 +42,11 @@ get = do where pathenv s = do v <- getEnv s - when (isJust v) $ - unsetEnv s case v of + Just d -> do + unsetEnv s + Just <$> absPath d Nothing -> return Nothing - Just d -> Just <$> absPath d configure Nothing r = Git.Config.read r configure (Just d) r = do r' <- Git.Config.read r -- cgit v1.2.3