mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 22:50:17 +08:00
Merge branch 'main' into duplicated-output
This commit is contained in:
@@ -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
src/util.ts
10
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user