Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[FrameworkBundle] Added missing return codes to commands

  • Loading branch information...
commit f91fc017369008106ce30f4b906517586bdb6d9e 1 parent 237629a
@hason authored
View
2  src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php
@@ -84,6 +84,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (!$matches) {
$output->writeln('<fg=red>None of the routes matches</>');
+
+ return 1;
}
}
}
View
8 src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
@@ -26,6 +26,10 @@
*/
class TranslationUpdateCommand extends ContainerAwareCommand
{
+ const RETURN_CODE_MISSING_OPTIONS = 1;
+
+ const RETURN_CODE_UNSUPPORTED_FORMAT = 2;
+
/**
* Compiled catalogue of messages.
* @var MessageCatalogue
@@ -82,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($input->getOption('force') !== true && $input->getOption('dump-messages') !== true) {
$output->writeln('<info>You must choose one of --force or --dump-messages</info>');
- return;
+ return self::RETURN_CODE_MISSING_OPTIONS;
}
// check format
@@ -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;
}
// get bundle directory
Please sign in to comment.
Something went wrong with that request. Please try again.