Skip to content

Commit

Permalink
Showing 6 changed files with 26 additions and 5 deletions.
3 changes: 2 additions & 1 deletion 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

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion lib/util.js
2 changes: 1 addition & 1 deletion lib/util.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/codeql.ts
@@ -17,6 +17,7 @@ import { Logger } from "./logging";
import * as toolcache from "./toolcache";
import { toolrunnerErrorCatcher } from "./toolrunner-error-catcher";
import * as util from "./util";
import { isGoodVersion } from "./util";

type Options = Array<string | number | boolean>;

@@ -403,7 +404,7 @@ export async function setupCodeQL(
toolCacheDir,
logger
);
if (codeqlVersions.length === 1) {
if (codeqlVersions.length === 1 && isGoodVersion(codeqlVersions[0])) {
const tmpCodeqlFolder = toolcache.find(
"CodeQL",
codeqlVersions[0],
10 changes: 10 additions & 0 deletions src/util.ts
@@ -14,6 +14,12 @@ import { Config } from "./config-utils";
import { Language } from "./languages";
import { Logger } from "./logging";

/**
* Specifies bundle versions that are known to be broken
* and will not be used if found in the toolcache.
*/
const BROKEN_VERSIONS = ["0.0.0-20211207"];

/**
* The URL for github.com.
*/
@@ -575,3 +581,7 @@ export async function bundleDb(
export async function delay(milliseconds: number) {
return new Promise((resolve) => setTimeout(resolve, milliseconds));
}

export function isGoodVersion(versionSpec: string) {
return !BROKEN_VERSIONS.includes(versionSpec);
}

0 comments on commit 705f634

Please sign in to comment.