Skip to content

Commit

Permalink
Don't ignore force option in InstallCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu committed Apr 6, 2024
1 parent b33d6fc commit 2aa3beb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class InstallCommand extends Command
*
* @return void
*/
public function handle()
public function handle(): void
{
$this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]);

Expand All @@ -41,10 +41,10 @@ public function handle()
$this->configureUuids();
}

if ($this->confirm('Would you like to run all pending database migrations?', true)) {
if ($this->option('force') || $this->confirm('Would you like to run all pending database migrations?', true)) {
$this->call('migrate');

if ($this->confirm('Would you like to create the "personal access" and "password grant" clients?', true)) {
if ($this->option('force') || $this->confirm('Would you like to create the "personal access" and "password grant" clients?', true)) {
$provider = in_array('users', array_keys(config('auth.providers'))) ? 'users' : null;

$this->call('passport:client', ['--personal' => true, '--name' => config('app.name').' Personal Access Client']);
Expand Down

0 comments on commit 2aa3beb

Please sign in to comment.