diff --git a/src/Composer/Command/BaseCommand.php b/src/Composer/Command/BaseCommand.php index 59cbbe9ab..2438614f8 100644 --- a/src/Composer/Command/BaseCommand.php +++ b/src/Composer/Command/BaseCommand.php @@ -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); }