Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
glennjacobs committed Feb 15, 2024
1 parent 6ae255f commit 594715e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/core/src/Console/Commands/Import/AddressData.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function handle(): void

if (! $newCountries->count()) {
$this->components->info('There are no new countries to import');
return;
exit(self::SUCCESS);
}

progress(
Expand Down Expand Up @@ -80,5 +80,7 @@ function ($country, Progress $progress) {
);

$this->components->info('Countries and States imported successfully');

exit(self::SUCCESS);
}
}
2 changes: 2 additions & 0 deletions packages/core/src/Console/Commands/MigrateGetCandy.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ public function handle(): void
),
]);
}

exit(self::SUCCESS);
}

protected function migrateTableNames($tables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ public function handle(): void
MarkAsNewCustomer::dispatch($order->id);
}
});

exit(self::SUCCESS);
}
}
6 changes: 4 additions & 2 deletions packages/core/src/Console/Commands/ScoutIndexerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function handle(): void
// Check if --refresh and --flush options has been passed
if ($this->option('flush') && $this->option('refresh')) {
$this->components->error('You can\'t use the [--refresh] and [--flush] options together.');
return;
exit(self::FAILURE);
}

// Return searchable models from config
Expand All @@ -78,7 +78,7 @@ public function handle(): void
// Error if option [--ignore] is passed and no model is informed
$this->components->error('No model passed on call');
$this->components->info('When using the [--ignore] option, you must provide at least one model to index.');
return;
exit(self::FAILURE);
} else {
// Run the indexer commands
$this->indexer($this->argument('models'));
Expand All @@ -91,5 +91,7 @@ public function handle(): void
// Run the indexer commands
$this->indexer($models);
}

exit(self::SUCCESS);
}
}

0 comments on commit 594715e

Please sign in to comment.