Skip to content

Commit

Permalink
[1.x] Validate the stack argument (#178)
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 3fc804a commit 1cc7b6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InstallCommand extends Command
/**
* Execute the console command.
*
* @return void
* @return int|null
*/
public function handle()
{
Expand All @@ -43,9 +43,13 @@ public function handle()
return $this->installInertiaReactStack();
} elseif ($this->argument('stack') === 'api') {
return $this->installApiStack();
} else {
} elseif ($this->argument('stack') === 'blade') {
return $this->installBladeStack();
}

$this->components->error('Invalid stack. Supported stacks are [blade], [react], [vue], and [api].');

return 1;
}

/**
Expand Down

0 comments on commit 1cc7b6d

Please sign in to comment.