1
0
Fork 0

Prevent automatic parent directory composer.json discovery if working-dir parameter is set

pull/6671/merge
Ayesh Karunaratne 2017-09-04 05:05:10 +05:30 committed by Jordi Boggiano
parent 8b61315b14
commit eb078b432f
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ class Application extends BaseApplication
} }
// prompt user for dir change if no composer.json is present in current dir // prompt user for dir change if no composer.json is present in current dir
if ($io->isInteractive() && !in_array($commandName, array('', 'list', 'init', 'about', 'help', 'diagnose', 'self-update', 'global', 'create-project'), true) && !file_exists(Factory::getComposerFile())) { if ($io->isInteractive() && !$input->getParameterOption('--working-dir') && !in_array($commandName, array('', 'list', 'init', 'about', 'help', 'diagnose', 'self-update', 'global', 'create-project'), true) && !file_exists(Factory::getComposerFile())) {
$dir = dirname(getcwd()); $dir = dirname(getcwd());
$home = realpath(getenv('HOME') ?: getenv('USERPROFILE') ?: '/'); $home = realpath(getenv('HOME') ?: getenv('USERPROFILE') ?: '/');