diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index c578a308c..7bcda88ab 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -64,7 +64,7 @@ EOT $install ->setDryRun($input->getOption('dry-run')) ->setVerbose($input->getOption('verbose')) - ->setPreferSource($input->getOption('prefer-source')) + ->setPreferSource($input->getOption('prefer-source') || $composer->getConfig()->get('prefer-source')) ->setPreferDist($input->getOption('prefer-dist')) ->setDevMode($input->getOption('dev')) ->setRunScripts(!$input->getOption('no-scripts')) diff --git a/src/Composer/Command/UpdateCommand.php b/src/Composer/Command/UpdateCommand.php index f1ac08f28..6515bbb83 100644 --- a/src/Composer/Command/UpdateCommand.php +++ b/src/Composer/Command/UpdateCommand.php @@ -67,7 +67,7 @@ EOT $install ->setDryRun($input->getOption('dry-run')) ->setVerbose($input->getOption('verbose')) - ->setPreferSource($input->getOption('prefer-source')) + ->setPreferSource($input->getOption('prefer-source') || $composer->getConfig()->get('prefer-source')) ->setPreferDist($input->getOption('prefer-dist')) ->setDevMode(!$input->getOption('no-dev')) ->setRunScripts(!$input->getOption('no-scripts'))