Allow init without license (#12145)
parent
ad3bfb87fd
commit
66bf6d31c3
|
@ -400,7 +400,7 @@ EOT
|
||||||
$license
|
$license
|
||||||
);
|
);
|
||||||
$spdx = new SpdxLicenses();
|
$spdx = new SpdxLicenses();
|
||||||
if (!$spdx->validate($license) && $license !== 'proprietary') {
|
if (null !== $license && !$spdx->validate($license) && $license !== 'proprietary') {
|
||||||
throw new \InvalidArgumentException('Invalid license provided: '.$license.'. Only SPDX license identifiers (https://spdx.org/licenses/) or "proprietary" are accepted.');
|
throw new \InvalidArgumentException('Invalid license provided: '.$license.'. Only SPDX license identifiers (https://spdx.org/licenses/) or "proprietary" are accepted.');
|
||||||
}
|
}
|
||||||
$input->setOption('license', $license);
|
$input->setOption('license', $license);
|
||||||
|
|
Loading…
Reference in New Issue