aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Install.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-27 22:57:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-27 22:57:04 -0400
commit04f27132314744ad743cda697761b510b1cb17e8 (patch)
tree0bc1cb9a4d850ba4310f4d591873576fde445e7f /Assistant/Install.hs
parent416d47891bd1b1c36ebaee6d94a05bc886e2fef8 (diff)
avoid using Data.AssocList, which is cunningly part of hxt
Diffstat (limited to 'Assistant/Install.hs')
-rw-r--r--Assistant/Install.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Assistant/Install.hs b/Assistant/Install.hs
index 475161c63..97f2dee94 100644
--- a/Assistant/Install.hs
+++ b/Assistant/Install.hs
@@ -21,7 +21,6 @@ import Utility.OSX
import Utility.FreeDesktop
#endif
-import Data.AssocList
import System.Posix.Env
standaloneAppBase :: IO (Maybe FilePath)
@@ -84,9 +83,10 @@ cleanEnvironment = clean <$> getEnvironment
| otherwise = Just $ catMaybes $ map (restoreorig env) env
| otherwise = Nothing
where
- vars = words $ lookup1 "GIT_ANNEX_STANDLONE_ENV" env
- restoreorig oldenv p@(k, v)
- | k `elem` vars = case lookup1 ("ORIG_" ++ k) oldenv of
- "" -> Nothing
- v' -> Just (k, v')
+ vars = words $ fromMaybe "" $
+ lookup "GIT_ANNEX_STANDLONE_ENV" env
+ restoreorig oldenv p@(k, _v)
+ | k `elem` vars = case lookup ("ORIG_" ++ k) oldenv of
+ Nothing -> Nothing
+ (Just v') -> Just (k, v')
| otherwise = Just p