Refuse to use broken versions in the toolcache

This commit is contained in:
Edoardo Pirovano 2021-12-09 13:43:57 +00:00
parent 6ad00fd084
commit 705f634a1d
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
6 changed files with 26 additions and 5 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],