build: allow script/spec-runner.js with empty list of runners (#33982)

This commit is contained in:
Milan Burda 2022-05-02 07:49:13 +02:00 committed by GitHub
parent b55f9d868a
commit 682d2e3f78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,8 +41,8 @@ const runners = new Map([
const specHashPath = path.resolve(__dirname, '../spec/.hash');
let runnersToRun = null;
if (args.runners) {
runnersToRun = args.runners.split(',');
if (args.runners !== undefined) {
runnersToRun = args.runners.split(',').filter(value => value);
if (!runnersToRun.every(r => [...runners.keys()].includes(r))) {
console.log(`${fail} ${runnersToRun} must be a subset of [${[...runners.keys()].join(' | ')}]`);
process.exit(1);