Skip to content

Commit

Permalink
Don't prompt for Git if Github Option is found (#269)
Browse files Browse the repository at this point in the history
* Don't prompt for Git if Github Option is enabled

* Update NewCommand.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
Jubeki and taylorotwell authored Aug 3, 2023
1 parent 0a2ad60 commit 237e332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ protected function interact(InputInterface $input, OutputInterface $output)
) === 'Pest');
}

if (! $input->getOption('git') && Process::fromShellCommandline('git --version')->run() === 0) {
$input->setOption('git', confirm(label: 'Would you like to initialize a Git repository?'));
if (! $input->getOption('git') && $input->getOption('github') === false && Process::fromShellCommandline('git --version')->run() === 0) {
$input->setOption('git', confirm(label: 'Would you like to initialize a Git repository?', default: false));
}
}

Expand Down

0 comments on commit 237e332

Please sign in to comment.