avoid using Data.AssocList, which is cunningly part of hxt

This commit is contained in:
Joey Hess 2012-11-27 22:57:04 -04:00
parent 6821279dd7
commit 6991f47e9e
2 changed files with 7 additions and 7 deletions

View file

@ -21,7 +21,6 @@ import Utility.OSX
import Utility.FreeDesktop import Utility.FreeDesktop
#endif #endif
import Data.AssocList
import System.Posix.Env import System.Posix.Env
standaloneAppBase :: IO (Maybe FilePath) standaloneAppBase :: IO (Maybe FilePath)
@ -84,9 +83,10 @@ cleanEnvironment = clean <$> getEnvironment
| otherwise = Just $ catMaybes $ map (restoreorig env) env | otherwise = Just $ catMaybes $ map (restoreorig env) env
| otherwise = Nothing | otherwise = Nothing
where where
vars = words $ lookup1 "GIT_ANNEX_STANDLONE_ENV" env vars = words $ fromMaybe "" $
restoreorig oldenv p@(k, v) lookup "GIT_ANNEX_STANDLONE_ENV" env
| k `elem` vars = case lookup1 ("ORIG_" ++ k) oldenv of restoreorig oldenv p@(k, _v)
"" -> Nothing | k `elem` vars = case lookup ("ORIG_" ++ k) oldenv of
v' -> Just (k, v') Nothing -> Nothing
(Just v') -> Just (k, v')
| otherwise = Just p | otherwise = Just p

View file

@ -20,4 +20,4 @@ building using cabal from clone of git clone git://git-annex.branchable.com/, co
Please provide any additional information below. Please provide any additional information below.
> [[done]], using Data.List instead now.