summaryrefslogtreecommitdiff
path: root/Assistant/Install.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-31 14:55:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-31 14:55:55 -0400
commit63948363a6def3639b6341f6bc083194c8bc6434 (patch)
treed4de9128957a9b9b6f55966c6eb5634e5faf19a4 /Assistant/Install.hs
parentbd1aa04396eb710a06d02ac5a3f4614db95c3b93 (diff)
avoid empty env vars when setting up clean environment
Diffstat (limited to 'Assistant/Install.hs')
-rw-r--r--Assistant/Install.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Install.hs b/Assistant/Install.hs
index 2b6297b1f..d29cefb8c 100644
--- a/Assistant/Install.hs
+++ b/Assistant/Install.hs
@@ -96,6 +96,7 @@ cleanEnvironment = clean <$> getEnvironment
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')
+ (Just v')
+ | not (null v') -> Just (k, v')
+ _ -> Nothing
| otherwise = Just p