Skip to content

Commit d09c2bc

Browse files
73rhodesvoxpelli
andcommitted
Update lib/cli/run-helpers.js
Co-authored-by: Pelle Wessman <[email protected]>
1 parent 5af8365 commit d09c2bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/cli/run-helpers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ const exitMochaLater = clampedCode => {
4141
*/
4242
const exitMocha = clampedCode => {
4343
const usePosixExitCodes = process.argv.includes('--posix-exit-codes');
44-
clampedCode =
45-
usePosixExitCodes && clampedCode > 0 ? EXIT_FAILURE : Math.min(clampedCode, 255);
44+
clampedCode = Math.min(clampedCode, process.argv.includes('--posix-exit-codes') ? 1 : 255);
4645
let draining = 0;
4746

4847
// Eagerly set the process's exit code in case stream.write doesn't

0 commit comments

Comments
 (0)