mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 11:10:22 +08:00
Add a comment explaining an edge-case.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user