Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a comment explaining an edge-case.
Chris Gavin committed Jul 27, 2020

Unverified

No user is associated with the committer email.
1 parent 5f05731 commit f4e72f4
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/codeql.ts
@@ -97,6 +97,8 @@ function getCodeQLActionRepository(): string {
const runnerTemp = util.getRequiredEnvParam("RUNNER_TEMP");
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
const relativeScriptPath = path.relative(actionsDirectory, __filename);
// This handles the case where the Action does not come from an Action repository,
// e.g. our integration tests which use the Action code from the current checkout.
if (relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath)) {
return CODEQL_DEFAULT_ACTION_REPOSITORY;
}

0 comments on commit f4e72f4

Please sign in to comment.