Skip to content
Snippets Groups Projects
Commit 77d9d8ee authored by Lucas Hedding's avatar Lucas Hedding Committed by Lucas Hedding
Browse files

Issue #3099325 by heddn, Chi: Always return exit code in Symfony console commands

parent 3f4bfbce
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ class CacheRebuild extends BaseCommand { ...@@ -27,6 +27,7 @@ class CacheRebuild extends BaseCommand {
parent::execute($input, $output); parent::execute($input, $output);
drupal_flush_all_caches(); drupal_flush_all_caches();
$output->writeln('Cache rebuild complete.'); $output->writeln('Cache rebuild complete.');
return 0;
} }
} }
...@@ -35,6 +35,7 @@ class DatabaseUpdate extends BaseCommand { ...@@ -35,6 +35,7 @@ class DatabaseUpdate extends BaseCommand {
else { else {
$output->writeln('No database updates required.'); $output->writeln('No database updates required.');
} }
return 0;
} }
/** /**
......
...@@ -16,7 +16,7 @@ class DatabaseUpdateStatus extends BaseCommand { ...@@ -16,7 +16,7 @@ class DatabaseUpdateStatus extends BaseCommand {
protected function configure() { protected function configure() {
parent::configure(); parent::configure();
$this->setName('updatedb-status') $this->setName('updatedb-status')
->setDescription('Apply any database updates required (as with running update.php).') ->setDescription('List any pending database updates.')
->setAliases(['updbst', 'updatedb:status']); ->setAliases(['updbst', 'updatedb:status']);
} }
...@@ -28,6 +28,7 @@ class DatabaseUpdateStatus extends BaseCommand { ...@@ -28,6 +28,7 @@ class DatabaseUpdateStatus extends BaseCommand {
$pending_updates = \Drupal::service('automatic_updates.pending_db_updates') $pending_updates = \Drupal::service('automatic_updates.pending_db_updates')
->run(); ->run();
$output->writeln($pending_updates); $output->writeln($pending_updates);
return 0;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment