1
0
Fork 0

Merge pull request #1173 from arnaud-lb/require-prefer-dist

added --prefer-dist option to require command
pull/1174/merge
Jordi Boggiano 2012-10-02 06:03:31 -07:00
commit 03cce01030
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class RequireCommand extends InitCommand
new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Required package with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"'), new InputArgument('packages', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Required package with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"'),
new InputOption('dev', null, InputOption::VALUE_NONE, 'Add requirement to require-dev.'), new InputOption('dev', null, InputOption::VALUE_NONE, 'Add requirement to require-dev.'),
new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'), new InputOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.'),
new InputOption('prefer-dist', null, InputOption::VALUE_NONE, 'Forces installation from package dist even for dev versions.'),
new InputOption('no-update', null, InputOption::VALUE_NONE, 'Disables the automatic update of the dependencies.'), new InputOption('no-update', null, InputOption::VALUE_NONE, 'Disables the automatic update of the dependencies.'),
)) ))
->setHelp(<<<EOT ->setHelp(<<<EOT
@ -98,6 +99,7 @@ EOT
$install $install
->setVerbose($input->getOption('verbose')) ->setVerbose($input->getOption('verbose'))
->setPreferSource($input->getOption('prefer-source')) ->setPreferSource($input->getOption('prefer-source'))
->setPreferDist($input->getOption('prefer-dist'))
->setDevMode($input->getOption('dev')) ->setDevMode($input->getOption('dev'))
->setUpdate(true) ->setUpdate(true)
->setUpdateWhitelist($requirements); ->setUpdateWhitelist($requirements);