1
0
Fork 0

Fix empty type support in init command, fixes #11999

pull/12013/head
Jordi Boggiano 2024-06-10 11:37:52 +02:00
parent ee2c9afdc8
commit 137ec17c0a
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 4 additions and 1 deletions

View File

@ -378,11 +378,14 @@ EOT
);
$input->setOption('stability', $minimumStability);
$type = $input->getOption('type') ?: false;
$type = $input->getOption('type');
$type = $io->ask(
'Package Type (e.g. library, project, metapackage, composer-plugin) [<comment>'.$type.'</comment>]: ',
$type
);
if ($type === '' || $type === false) {
$type = null;
}
$input->setOption('type', $type);
if (null === $license = $input->getOption('license')) {