aboutsummaryrefslogtreecommitdiff
path: root/Git/Index.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-15 20:33:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-15 20:33:52 -0400
commita87f9b63077c8b93f4b2284d494c0081bd938f8d (patch)
treed56e424b73aecfca32f24b637fcc0dcc2050adce /Git/Index.hs
parent10ff3282ee60cc41ad9d9ac71a99eea7053cebaa (diff)
Use haskell setenv library to clean up several ugly workarounds for inability to manipulate the environment on windows.
Didn't know that this library existed! This includes making git-annex not re-exec itself on start on windows, and making the test suite on Windows run tests without forking.
Diffstat (limited to 'Git/Index.hs')
-rw-r--r--Git/Index.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/Index.hs b/Git/Index.hs
index d712245a8..c42ac42f8 100644
--- a/Git/Index.hs
+++ b/Git/Index.hs
@@ -21,8 +21,8 @@ import Utility.Env
override :: FilePath -> IO (IO ())
override index = do
res <- getEnv var
- void $ setEnv var index True
- return $ void $ reset res
+ setEnv var index True
+ return $ reset res
where
var = "GIT_INDEX_FILE"
reset (Just v) = setEnv var v True