Skip to content

Commit f4e72f4

Browse files
committed
Add a comment explaining an edge-case.
1 parent 5f05731 commit f4e72f4

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/codeql.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/codeql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ function getCodeQLActionRepository(): string {
9797
const runnerTemp = util.getRequiredEnvParam("RUNNER_TEMP");
9898
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
9999
const relativeScriptPath = path.relative(actionsDirectory, __filename);
100+
// This handles the case where the Action does not come from an Action repository,
101+
// e.g. our integration tests which use the Action code from the current checkout.
100102
if (relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath)) {
101103
return CODEQL_DEFAULT_ACTION_REPOSITORY;
102104
}

0 commit comments

Comments
 (0)