Skip to content

Commit 84867b7

Browse files
committed
Revert "[Console] ensure exit code between 0-254"
This reverts commit 6b9180a.
1 parent 82e5552 commit 84867b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ public function run(InputInterface $input = null, OutputInterface $output = null
126126
}
127127

128128
if ($this->autoExit) {
129-
// ensure exit code is between 0-254 (255 is reserved by PHP and should not be used)
129+
if ($statusCode > 255) {
130+
$statusCode = 255;
131+
}
130132
// @codeCoverageIgnoreStart
131-
exit(max(0, min(254, $statusCode)));
133+
exit($statusCode);
132134
// @codeCoverageIgnoreEnd
133135
}
134136

0 commit comments

Comments
 (0)