Allow overriding path of temporary files.

This commit is contained in:
Chris Gavin 2021-02-01 15:18:14 +00:00
parent 6408d72268
commit ed751ece83
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
12 changed files with 22 additions and 15 deletions

View file

@ -45,6 +45,11 @@ export function getRequiredEnvParam(paramName: string): string {
return value;
}
export function getTemporaryDirectory(): string {
const value = process.env["CODEQL_ACTION_TEMP"];
return value !== undefined ? value : getRequiredEnvParam("RUNNER_TEMP");
}
/**
* Ensures all required environment variables are set in the context of a local run.
*/