fix(scripts/gen-deps-list.js): non-zero status code on invalid arg

Also, display the usage on stderr instead of stdout.
This commit is contained in:
Julien Fontanet 2023-03-16 11:21:53 +01:00
parent 89bc6da5f4
commit 5885df4ae9

View File

@ -44,7 +44,7 @@ async function main(args, scriptName) {
}
} else {
if (args.length !== 0) {
process.stdout.write(`Usage:
process.stderr.write(`Usage:
${scriptName}
Read the list of packages with changes from \`CHANGELOG.unreleased.md\` and compute the list of packages to be released.
@ -54,6 +54,8 @@ async function main(args, scriptName) {
Does not do any side effects.
`)
process.exitCode = 1
return
}
await readPackagesFromChangelog(toRelease)