Merge pull request #594 from github/simon-engledew/fix-runner-temp-missing
Restore original getCodeQLActionRepository behaviour
This commit is contained in:
commit
db80a9a7c3
7 changed files with 9 additions and 10 deletions
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
## [UNRELEASED]
|
||||
|
||||
No user facing changes.
|
||||
|
||||
- Fix `RUNNER_TEMP environment variable must be set` when using runner.
|
||||
## 1.0.3 - 23 Jun 2021
|
||||
|
||||
No user facing changes.
|
||||
|
|
|
|||
2
lib/codeql.js
generated
2
lib/codeql.js
generated
|
|
@ -47,7 +47,7 @@ function getCodeQLBundleName() {
|
|||
return `codeql-bundle-${platform}.tar.gz`;
|
||||
}
|
||||
function getCodeQLActionRepository(logger) {
|
||||
if (util.isActions()) {
|
||||
if (!util.isActions()) {
|
||||
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
4
lib/codeql.test.js
generated
4
lib/codeql.test.js
generated
|
|
@ -192,10 +192,10 @@ ava_1.default("getExtraOptions throws for bad content", (t) => {
|
|||
});
|
||||
ava_1.default("getCodeQLActionRepository", (t) => {
|
||||
const logger = logging_1.getRunnerLogger(true);
|
||||
util_1.initializeEnvironment(util_1.Mode.actions, "1.2.3");
|
||||
util_1.initializeEnvironment(util_1.Mode.runner, "1.2.3");
|
||||
const repoActions = codeql.getCodeQLActionRepository(logger);
|
||||
t.deepEqual(repoActions, "github/codeql-action");
|
||||
util_1.initializeEnvironment(util_1.Mode.runner, "1.2.3");
|
||||
util_1.initializeEnvironment(util_1.Mode.actions, "1.2.3");
|
||||
// isRunningLocalAction() === true
|
||||
delete process.env["GITHUB_ACTION_REPOSITORY"];
|
||||
process.env["RUNNER_TEMP"] = path.dirname(__dirname);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -374,11 +374,11 @@ test("getExtraOptions throws for bad content", (t) => {
|
|||
test("getCodeQLActionRepository", (t) => {
|
||||
const logger = getRunnerLogger(true);
|
||||
|
||||
initializeEnvironment(Mode.actions, "1.2.3");
|
||||
initializeEnvironment(Mode.runner, "1.2.3");
|
||||
const repoActions = codeql.getCodeQLActionRepository(logger);
|
||||
t.deepEqual(repoActions, "github/codeql-action");
|
||||
|
||||
initializeEnvironment(Mode.runner, "1.2.3");
|
||||
initializeEnvironment(Mode.actions, "1.2.3");
|
||||
|
||||
// isRunningLocalAction() === true
|
||||
delete process.env["GITHUB_ACTION_REPOSITORY"];
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ function getCodeQLBundleName(): string {
|
|||
}
|
||||
|
||||
export function getCodeQLActionRepository(logger: Logger): string {
|
||||
if (util.isActions()) {
|
||||
if (!util.isActions()) {
|
||||
return CODEQL_DEFAULT_ACTION_REPOSITORY;
|
||||
} else {
|
||||
return getActionsCodeQLActionRepository(logger);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue