From 9fd4f22ba2c8db648ac580fe1bcdccaee7adf3d7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 21 Aug 2017 09:16:54 +0200 Subject: [PATCH] Also ignore dir change prompt in list command --- src/Composer/Console/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 6e574d490..bbe551a83 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -127,7 +127,7 @@ class Application extends BaseApplication } // prompt user for dir change if no composer.json is present in current dir - if ($io->isInteractive() && !in_array($commandName, array('init', 'about', 'help', 'diagnose', 'self-update', 'global', 'create-project'), true) && !file_exists(Factory::getComposerFile())) { + if ($io->isInteractive() && !in_array($commandName, array('', 'list', 'init', 'about', 'help', 'diagnose', 'self-update', 'global', 'create-project'), true) && !file_exists(Factory::getComposerFile())) { $dir = dirname(getcwd()); $home = realpath(getenv('HOME') ?: getenv('USERPROFILE') ?: '/');