From cf81e72ab7069c73e8561dd7efbf9fe7c4b2663f Mon Sep 17 00:00:00 2001 From: Julius Kiekbusch Date: Thu, 3 Aug 2023 12:44:16 +0200 Subject: [PATCH 1/2] Don't prompt for Git if Github Option is enabled --- src/NewCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index 3c33cf9e..46aae626 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -107,7 +107,7 @@ protected function interact(InputInterface $input, OutputInterface $output) ) === 'Pest'); } - if (! $input->getOption('git') && Process::fromShellCommandline('git --version')->run() === 0) { + 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?')); } } From 82e98b84ab2b590650bcf7f723cb91cb0ea5396b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 3 Aug 2023 08:56:11 -0500 Subject: [PATCH 2/2] Update NewCommand.php --- src/NewCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index 46aae626..f7fb552c 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -108,7 +108,7 @@ protected function interact(InputInterface $input, OutputInterface $output) } 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?')); + $input->setOption('git', confirm(label: 'Would you like to initialize a Git repository?', default: false)); } }