Skip to content

Commit 57f8129

Browse files
author
Amrouche Hamza
committed
[Console] Fix console tests by adding the missing condition
1 parent b4e0a45 commit 57f8129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Event/ConsoleErrorEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ public function setExitCode($exitCode)
7878
*/
7979
public function getExitCode()
8080
{
81-
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) ? $this->error->getCode() : 1);
81+
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
8282
}
8383
}

0 commit comments

Comments
 (0)