From 7ea06da7be1656eecd58acb9ee22cd355670b951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harold=20Ju=C3=A1rez?= Date: Tue, 21 May 2019 13:28:35 -0600 Subject: [PATCH] [router:rebuild] Handle unsuccessful rebuild (#4050) --- src/Command/Router/RebuildCommand.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Command/Router/RebuildCommand.php b/src/Command/Router/RebuildCommand.php index 8fd4a197c..d1fda0f0d 100644 --- a/src/Command/Router/RebuildCommand.php +++ b/src/Command/Router/RebuildCommand.php @@ -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')