From 96add8b9cc525c63084ca14647d31f5eaec8171d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 15 Apr 2024 10:19:41 -0700 Subject: [PATCH] Command tests: include regular PATH... ...after directory with the test executable. I want to see if this fixes the CI problem on Windows, which may be due to problems finding a DLL. --- test/Tests/Helpers.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Tests/Helpers.hs b/test/Tests/Helpers.hs index 450b8660a..af037236d 100644 --- a/test/Tests/Helpers.hs +++ b/test/Tests/Helpers.hs @@ -89,12 +89,14 @@ setupEnvironment testExePath = do mldpath <- Env.lookupEnv "LD_LIBRARY_PATH" mdyldpath <- Env.lookupEnv "DYLD_LIBRARY_PATH" mpdd <- Env.lookupEnv "pandoc_datadir" + mbpath <- Env.lookupEnv "PATH" -- Note that Cabal sets the pandoc_datadir environment variable -- to point to the source directory, since otherwise getDataFilename -- will look in the data directory into which pandoc will be installed -- (but has not yet been). So when we spawn a new process with -- pandoc, we need to make sure this environment variable is set. - return $ ("PATH",takeDirectory testExePath) : + return $ ("PATH",takeDirectory testExePath <> + maybe mempty (searchPathSeparator:) mbpath) : ("TMP",".") : ("LANG","en_US.UTF-8") : ("HOME", "./") :