Add a comment explaining an edge-case.
This commit is contained in:
parent
5f057318b6
commit
f4e72f4a09
3 changed files with 5 additions and 1 deletions
2
lib/codeql.js
generated
2
lib/codeql.js
generated
|
|
@ -47,6 +47,8 @@ function getCodeQLActionRepository() {
|
||||||
const runnerTemp = util.getRequiredEnvParam("RUNNER_TEMP");
|
const runnerTemp = util.getRequiredEnvParam("RUNNER_TEMP");
|
||||||
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
|
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
|
||||||
const relativeScriptPath = path.relative(actionsDirectory, __filename);
|
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)) {
|
if (relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath)) {
|
||||||
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -97,6 +97,8 @@ function getCodeQLActionRepository(): string {
|
||||||
const runnerTemp = util.getRequiredEnvParam("RUNNER_TEMP");
|
const runnerTemp = util.getRequiredEnvParam("RUNNER_TEMP");
|
||||||
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
|
const actionsDirectory = path.join(path.dirname(runnerTemp), "_actions");
|
||||||
const relativeScriptPath = path.relative(actionsDirectory, __filename);
|
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)) {
|
if (relativeScriptPath.startsWith("..") || path.isAbsolute(relativeScriptPath)) {
|
||||||
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue