From cb6661210fcc22ff46bb04a8994f5fb6060af33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 22 Apr 2020 22:31:51 +0200 Subject: [PATCH] Make sure an int exit code is always returned --- src/Traits/TenantAwareCommand.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Traits/TenantAwareCommand.php b/src/Traits/TenantAwareCommand.php index e86168df..fb11df9f 100644 --- a/src/Traits/TenantAwareCommand.php +++ b/src/Traits/TenantAwareCommand.php @@ -14,14 +14,8 @@ trait TenantAwareCommand protected function execute(InputInterface $input, OutputInterface $output) { $tenants = $this->getTenants(); - - if (count($tenants) === 1) { - return $tenants[0]->run(function () { - return $this->laravel->call([$this, 'handle']); - }); - } - $exitCode = 0; + foreach ($tenants as $tenant) { $result = (int) $tenant->run(function () { return $this->laravel->call([$this, 'handle']);