diff --git a/common/tools/dev-tool/src/commands/samples/checkNodeVersions.ts b/common/tools/dev-tool/src/commands/samples/checkNodeVersions.ts index 933fb5bc19b1..bc28e4ee43ac 100644 --- a/common/tools/dev-tool/src/commands/samples/checkNodeVersions.ts +++ b/common/tools/dev-tool/src/commands/samples/checkNodeVersions.ts @@ -269,7 +269,12 @@ export const commandInfo = makeCommandInfo( export default leafCommand(commandInfo, async (options) => { const nodeVersions = [ - ...new Set(options["node-versions"]?.split(",").concat(options["node-version"])) + ...new Set( + options["node-versions"] + ?.split(",") + .concat(options["node-version"]) + .filter((ver) => ver !== "" && parseInt(ver) !== NaN) + ) ]; const dockerContextDirectory: string = options["context-directory-path"] === ""