Use a relative path to ignore the runner temporary directory.

This commit is contained in:
Chris Gavin 2020-09-29 14:26:57 +01:00
parent 206e34cbb4
commit dbecf76db8
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
6 changed files with 6 additions and 6 deletions

View file

@ -64,7 +64,7 @@ test("exclude temp dir", async (t) => {
};
analysisPaths.includeAndExcludeAnalysisPaths(config, getRunnerLogger(true));
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);
t.is(process.env["LGTM_INDEX_EXCLUDE"], tempDir);
t.is(process.env["LGTM_INDEX_EXCLUDE"], "codeql-runner-temp");
t.is(process.env["LGTM_INDEX_FILTERS"], undefined);
});
});

View file

@ -59,7 +59,7 @@ export function includeAndExcludeAnalysisPaths(
logger.warning(
"Storing the CodeQL Runner in the directory being analyzed is not recommended."
);
pathsIgnore = pathsIgnore.concat(config.tempDir);
pathsIgnore = pathsIgnore.concat(tempRelativeToWorking);
}
if (pathsIgnore.length !== 0) {
process.env["LGTM_INDEX_EXCLUDE"] = buildIncludeExcludeEnvVar(pathsIgnore);