Fix empty type support in init command, fixes #11999
parent
ee2c9afdc8
commit
137ec17c0a
|
@ -378,11 +378,14 @@ EOT
|
||||||
);
|
);
|
||||||
$input->setOption('stability', $minimumStability);
|
$input->setOption('stability', $minimumStability);
|
||||||
|
|
||||||
$type = $input->getOption('type') ?: false;
|
$type = $input->getOption('type');
|
||||||
$type = $io->ask(
|
$type = $io->ask(
|
||||||
'Package Type (e.g. library, project, metapackage, composer-plugin) [<comment>'.$type.'</comment>]: ',
|
'Package Type (e.g. library, project, metapackage, composer-plugin) [<comment>'.$type.'</comment>]: ',
|
||||||
$type
|
$type
|
||||||
);
|
);
|
||||||
|
if ($type === '' || $type === false) {
|
||||||
|
$type = null;
|
||||||
|
}
|
||||||
$input->setOption('type', $type);
|
$input->setOption('type', $type);
|
||||||
|
|
||||||
if (null === $license = $input->getOption('license')) {
|
if (null === $license = $input->getOption('license')) {
|
||||||
|
|
Loading…
Reference in New Issue