From c6271f1f7f12d908641327752a506445024c7824 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 2 Oct 2024 16:21:16 +0200 Subject: [PATCH] Fix init command to accept proprietary as license --- src/Composer/Command/InitCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 0829eb09d..71dd83f53 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -400,7 +400,7 @@ EOT $license ); $spdx = new SpdxLicenses(); - if (!$spdx->validate($license)) { + if (!$spdx->validate($license) && $license !== 'proprietary') { throw new \InvalidArgumentException('Invalid license provided: '.$license.'. Only SPDX license identifiers (https://spdx.org/licenses/) or "proprietary" are accepted.'); } $input->setOption('license', $license);