Skip to content

Commit

Permalink
Make sure an int exit code is always returned
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl authored Apr 22, 2020
1 parent 4a53767 commit cb66612
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Traits/TenantAwareCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit cb66612

Please sign in to comment.