Skip to content

Commit

Permalink
[2.x] Validate the stack argument (#1113)
Browse files Browse the repository at this point in the history
* Validate the stack argument

* Update InstallCommand.php

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
jessarcher and taylorotwell authored Aug 8, 2022
1 parent b1f66c2 commit 9ae00ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ class InstallCommand extends Command
/**
* Execute the console command.
*
* @return void
* @return int|null
*/
public function handle()
{
if (! in_array($this->argument('stack'), ['inertia', 'livewire'])) {
$this->components->error('Invalid stack. Supported stacks are [inertia] and [livewire].');

return 1;
}

// Publish...
$this->callSilent('vendor:publish', ['--tag' => 'jetstream-config', '--force' => true]);
$this->callSilent('vendor:publish', ['--tag' => 'jetstream-migrations', '--force' => true]);
Expand Down

0 comments on commit 9ae00ba

Please sign in to comment.