summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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