Skip to content

Commit

Permalink
Fix COMPOSER_NO_DEV to work with --update-no-dev for require/remove c…
Browse files Browse the repository at this point in the history
…ommands as well, refs #10995
  • Loading branch information
Seldaek committed Aug 16, 2022
1 parent 1f0bd51 commit 6457a88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Composer/Command/BaseCommand.php
Expand Up @@ -165,6 +165,11 @@ protected function initialize(InputInterface $input, OutputInterface $output)
$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);
}
Expand Down

0 comments on commit 6457a88

Please sign in to comment.