Skip to content

Commit eeaa56b

Browse files
committed
Add some extra validation for runs.using
1 parent bee9891 commit eeaa56b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎build.mjs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,18 @@ const checkNodeVersionsPlugin = {
5353

5454
// Find the `runs.using` value in the specification.
5555
const using = specification.runs.using;
56-
if (using === undefined) {
56+
if (using === undefined || using === null) {
5757
throw new Error(
5858
`Couldn't find 'runs.using' in ${actionSpecification}`,
5959
);
6060
}
6161

62+
if (typeof using !== "string" || !using.startsWith("node")) {
63+
throw new Error(
64+
`Expected 'runs.using' to be a string starting with 'node' in ${actionSpecification}`,
65+
);
66+
}
67+
6268
if (nodeVersion === undefined) {
6369
// First one we found: set it as the baseline.
6470
nodeVersion = using;

0 commit comments

Comments
 (0)