diff --git a/build.mjs b/build.mjs index 2659c65f4..dea430ee4 100644 --- a/build.mjs +++ b/build.mjs @@ -53,12 +53,18 @@ const checkNodeVersionsPlugin = { // Find the `runs.using` value in the specification. const using = specification.runs.using; - if (using === undefined) { + if (using === undefined || using === null) { throw new Error( `Couldn't find 'runs.using' in ${actionSpecification}`, ); } + if (typeof using !== "string" || !using.startsWith("node")) { + throw new Error( + `Expected 'runs.using' to be a string starting with 'node' in ${actionSpecification}`, + ); + } + if (nodeVersion === undefined) { // First one we found: set it as the baseline. nodeVersion = using;