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

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