[2.1] Added missing error return codes in commands #5586

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@hason
hason commented Sep 24, 2012

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
See: #5585

@fabpot
Member
fabpot commented Sep 24, 2012

Exit code values are standardized and some values have some well-defined meaning. Have a look here for more info: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Process.php#L67

@stof stof commented on the diff Oct 13, 2012
.../FrameworkBundle/Command/TranslationUpdateCommand.php
@@ -92,7 +96,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln('<error>Wrong output format</error>');
$output->writeln('Supported formats are '.implode(', ', $supportedFormats).'.');
- return;
+ return self::RETURN_CODE_UNSUPPORTED_FORMAT;
@stof
stof Oct 13, 2012 Symfony member

@hason please change it to return 1 in both cases as returning 2 is wrong according to its meaning

@fabpot fabpot added a commit that referenced this pull request Oct 14, 2012
@fabpot fabpot merged branch hason/return_code (PR #5586)
This PR was squashed before being merged into the 2.1 branch (closes #5586).

Commits
-------

6b66bc3 [2.1] Added missing error return codes in commands

Discussion
----------

[2.1] Added missing error return codes in commands

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
See: #5585

---------------------------------------------------------------------------

by fabpot at 2012-09-24T12:10:47Z

Exit code values are standardized and some values have some well-defined meaning. Have a look here for more info: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Process.php#L67
98070d5
@fabpot fabpot added a commit that closed this pull request Oct 14, 2012
@fabpot fabpot merged branch hason/return_code (PR #5586)
This PR was squashed before being merged into the 2.1 branch (closes #5586).

Commits
-------

6b66bc3 [2.1] Added missing error return codes in commands

Discussion
----------

[2.1] Added missing error return codes in commands

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
See: #5585

---------------------------------------------------------------------------

by fabpot at 2012-09-24T12:10:47Z

Exit code values are standardized and some values have some well-defined meaning. Have a look here for more info: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Process.php#L67
98070d5
@fabpot fabpot closed this in 98070d5 Oct 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment