Fix test on Windows

This commit is contained in:
Chris Smowton
2025-02-28 14:09:58 +00:00
parent 0c99ae2800
commit c43b2b167f

View File

@@ -3,8 +3,12 @@ import os.path
import shutil
def test(codeql, java, check_diagnostics):
# Avoid shutil resolving mvn to the wrapper script in the test dir:
os.environ["NoDefaultCurrentDirectoryInExePath"] = "0"
runenv = {
"PATH": os.path.realpath(os.path.dirname(__file__)) + os.pathsep + os.getenv("PATH"),
"REAL_MVN_PATH": shutil.which("mvn"),
}
del os.environ["NoDefaultCurrentDirectoryInExePath"]
codeql.database.create(build_mode = "none", _env = runenv)