fix environment propigation in windows test suite
Let through HOME, etc when running git-annex from test suite.
This commit is contained in:
parent
1fbf5f608d
commit
38cd30752c
1 changed files with 3 additions and 2 deletions
5
Test.hs
5
Test.hs
|
@ -1392,7 +1392,8 @@ prepareTestEnv forcedirect = do
|
||||||
cwd <- getCurrentDirectory
|
cwd <- getCurrentDirectory
|
||||||
p <- Utility.Env.getEnvDefault "PATH" ""
|
p <- Utility.Env.getEnvDefault "PATH" ""
|
||||||
|
|
||||||
let env =
|
env <- Utility.Env.getEnvironment
|
||||||
|
let newenv =
|
||||||
-- Ensure that the just-built git annex is used.
|
-- Ensure that the just-built git annex is used.
|
||||||
[ ("PATH", cwd ++ [searchPathSeparator] ++ p)
|
[ ("PATH", cwd ++ [searchPathSeparator] ++ p)
|
||||||
, ("TOPDIR", cwd)
|
, ("TOPDIR", cwd)
|
||||||
|
@ -1408,7 +1409,7 @@ prepareTestEnv forcedirect = do
|
||||||
, ("FORCEDIRECT", if forcedirect then "1" else "")
|
, ("FORCEDIRECT", if forcedirect then "1" else "")
|
||||||
]
|
]
|
||||||
|
|
||||||
return $ M.fromList env
|
return $ M.fromList newenv `M.union` M.fromList env
|
||||||
|
|
||||||
changeToTmpDir :: TestEnv -> FilePath -> IO ()
|
changeToTmpDir :: TestEnv -> FilePath -> IO ()
|
||||||
changeToTmpDir env t = do
|
changeToTmpDir env t = do
|
||||||
|
|
Loading…
Add table
Reference in a new issue