Skip to content

Commit

Permalink
Coerce process.exitCode to number to match local usage (#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn authored Jun 9, 2024
1 parent 2c6a7bb commit 19fa79f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,7 @@ Expecting one of '${allowedValues.join("', '")}'`);

help(contextOptions) {
this.outputHelp(contextOptions);
let exitCode = process.exitCode || 0;
let exitCode = Number(process.exitCode ?? 0); // process.exitCode does allow a string of an integer, but we prefer just a number
if (
exitCode === 0 &&
contextOptions &&
Expand Down

0 comments on commit 19fa79f

Please sign in to comment.