Skip to content

Commit b8675e1

Browse files
authored
fix: make user command does not accept a name argument (#216)
1 parent 8b134dc commit b8675e1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Commands/MakeUserCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MakeUserCommand extends Command
1616
*
1717
* @var string
1818
*/
19-
protected $signature = 'cachet:make:user {email?} {--password= : The user\'s password} {--admin : Whether the user is an admin}';
19+
protected $signature = 'cachet:make:user {email?} {--password= : The user\'s password} {--admin : Whether the user is an admin} {--name= : The name of the user }';
2020

2121
/**
2222
* The console command description.
@@ -53,6 +53,11 @@ public function handle(): int
5353
$this->email = $this->argument('email');
5454
$this->isAdmin = $this->option('admin');
5555
$this->password = $this->option('password');
56+
$this->data['name'] = $this->option('name');
57+
58+
if (! $this->data['name']) {
59+
$this->promptName();
60+
}
5661

5762
$this->promptName();
5863

0 commit comments

Comments
 (0)