diff --git a/src/NewCommand.php b/src/NewCommand.php index f9bef70..95015ac 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -177,11 +177,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int $composer = $this->findComposer(); $phpBinary = $this->phpBinary(); - $commands = [ + $commands = array_filter([ $composer." create-project laravel/laravel \"$directory\" $version --remove-vcs --prefer-dist --no-scripts", $composer." run post-root-package-install -d \"$directory\"", $phpBinary." \"$directory/artisan\" key:generate --ansi", - ]; + ]); if ($directory != '.' && $input->getOption('force')) { if (PHP_OS_FAMILY == 'Windows') { @@ -492,7 +492,7 @@ protected function promptForDatabaseOptions(string $directory, InputInterface $i ); } - return [$input->getOption('database') ?? $defaultDatabase, $migrate ?? false]; + return [$input->getOption('database') ?? $defaultDatabase, $migrate ?? $input->hasOption('database')]; } /**