1
0
Fork 0

Fix COMPOSER_NO_DEV to work with --update-no-dev for require/remove commands as well, refs #10995

pull/10996/head
Jordi Boggiano 2022-08-16 11:15:52 +02:00
parent 1f0bd51f55
commit 6457a88aa1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 0 deletions

View File

@ -165,6 +165,11 @@ abstract class BaseCommand extends Command
$input->setOption('no-dev', true);
}
}
if (true == $input->hasOption('update-no-dev')) {
if (!$input->getOption('update-no-dev') && true == Platform::getEnv('COMPOSER_NO_DEV')) {
$input->setOption('update-no-dev', true);
}
}
parent::initialize($input, $output);
}