fix murph:user:create command

This commit is contained in:
Simon Vieille 2021-05-13 22:39:26 +02:00
parent fa7fcd5022
commit 5dc9173403
1 changed files with 7 additions and 1 deletions

View File

@ -42,7 +42,13 @@ class UserCreateCommand extends Command
$emailQuestion = new Question('E-mail: ');
$emailQuestion->setValidator(function ($value) {
return !empty($value);
if (empty($value)) {
throw new \RuntimeException(
'The email must not be empty.'
);
}
return $value;
});
$passwordQuestion = new Question('Password (leave empty to generate a random password): ');