Skip to content

Commit 19fa79f

Browse files
authored
Coerce process.exitCode to number to match local usage (tj#2209)
1 parent 2c6a7bb commit 19fa79f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/command.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
23922392

23932393
help(contextOptions) {
23942394
this.outputHelp(contextOptions);
2395-
let exitCode = process.exitCode || 0;
2395+
let exitCode = Number(process.exitCode ?? 0); // process.exitCode does allow a string of an integer, but we prefer just a number
23962396
if (
23972397
exitCode === 0 &&
23982398
contextOptions &&

0 commit comments

Comments
 (0)