Skip to content

Commit

Permalink
Command tests: include regular PATH...
Browse files Browse the repository at this point in the history
...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.
  • Loading branch information
jgm committed Apr 15, 2024
1 parent 0f8086c commit 96add8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/Tests/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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", "./") :
Expand Down

0 comments on commit 96add8b

Please sign in to comment.