Merge branch 'main' into duplicated-output

This commit is contained in:
Chris Gavin
2021-12-13 11:44:22 +00:00
committed by GitHub
12 changed files with 36 additions and 11 deletions

View File

@@ -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],

View File

@@ -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);
}