Use correct temporary directory

This commit is contained in:
Piotr Halama 2018-10-22 13:32:36 +02:00
parent 66cfa2397e
commit dc1618a0ec

View File

@ -509,7 +509,7 @@ shouldReturnAlmost action expected = action >>= (@=~? expected)
runGitTest :: String -> (FilePath -> IO a) -> IO a runGitTest :: String -> (FilePath -> IO a) -> IO a
runGitTest name callback = do runGitTest name callback = do
withTempDirectory "/tmp" "geval-submit-test" $ \temp -> do withSystemTempDirectory "geval-submit-test" $ \temp -> do
copyFile ("test/_submit-tests/" ++ name ++ ".tar") (temp ++ "/" ++ name ++ ".tar") copyFile ("test/_submit-tests/" ++ name ++ ".tar") (temp ++ "/" ++ name ++ ".tar")
withCurrentDirectory temp $ do withCurrentDirectory temp $ do
callCommand $ "tar xf " ++ name ++ ".tar" callCommand $ "tar xf " ++ name ++ ".tar"