Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Apr 15, 2024
1 parent 8ef9649 commit 3f8a440
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/Console/UserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,27 @@ protected function configure()

$this->setName($this->name)
->setDescription($this->description);

if (class_exists(Prompt::class) && method_exists(Prompt::class, 'interactive')) {
Prompt::interactive(false);
}
}

/** {@inheritDoc} */
#[\Override]
protected function initialize(InputInterface $input, OutputInterface $output)
{
$input->setInteractive(false);

if (class_exists(Prompt::class)) {
Prompt::fallbackWhen(true);

if (method_exists(Prompt::class, 'interactive')) {
Prompt::interactive(false);
}
}
}

/** {@inheritDoc} */
#[\Override]
protected function specifyParameters()
{
if (class_exists(Prompt::class)) {
Prompt::fallbackWhen(true);
}

$this->originalCreateUserCommandCallback = Nova::$createUserCommandCallback;

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Util/CreateUserOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CreateUserOptions
/**
* The questions callback.
*
* @var callable():(\Illuminate\Support\Collection<int, array>)
* @var callable(\NovaKit\NovaOnVapor\Console\Util\CreateUserOptions):array
*/
protected $questionsCallback;

Expand Down

0 comments on commit 3f8a440

Please sign in to comment.