Skip to content

Commit

Permalink
[router:rebuild] Handle unsuccessful rebuild (#4050)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuarez20 authored and enzolutions committed May 21, 2019
1 parent e64ab9b commit 7ea06da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Command/Router/RebuildCommand.php
Expand Up @@ -45,7 +45,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->trans('commands.router.rebuild.messages.rebuilding')
);

$this->routerBuilder->rebuild();
if(!$this->routerBuilder->rebuild()) {
$this->getIo()->error(
$this->trans('commands.router.rebuild.messages.error-rebuild')
);
return 1;
}

$this->getIo()->success(
$this->trans('commands.router.rebuild.messages.completed')
Expand Down

0 comments on commit 7ea06da

Please sign in to comment.