mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
Make unguarded-action-lib better at ignoring uses of toolcache
This commit is contained in:
@@ -277,17 +277,10 @@ export async function setupCodeQL(
|
||||
codeqlURL: string | undefined,
|
||||
apiDetails: api.GitHubApiDetails,
|
||||
tempDir: string,
|
||||
toolsDir: string,
|
||||
mode: util.Mode,
|
||||
variant: util.GitHubVariant,
|
||||
logger: Logger
|
||||
): Promise<{ codeql: CodeQL; toolsVersion: string }> {
|
||||
// Setting these two env vars makes the toolcache code safe to use outside,
|
||||
// of actions but this is obviously not a great thing we're doing and it would
|
||||
// be better to write our own implementation to use outside of actions.
|
||||
process.env["RUNNER_TEMP"] = tempDir;
|
||||
process.env["RUNNER_TOOL_CACHE"] = toolsDir;
|
||||
|
||||
try {
|
||||
// We use the special value of 'latest' to prioritize the version in the
|
||||
// defaults over any pinned cached version.
|
||||
|
||||
Reference in New Issue
Block a user