composer: Composer 1.7.0 regression for 'composer status': chdir(): No such file or directory (errno 2)
With composer 1.6.5:
$ composer --version
Composer version 1.6.5 2018-05-04 11:44:59
$ composer status
No local changes
With composer 1.7.0:
composer --version
Composer version 1.7.0 2018-08-03 15:39:07
$ composer status
[ErrorException]
chdir(): No such file or directory (errno 2)
status [-v|vv|vvv|--verbose]
More debug output for 1.7.0:
$ composer status -vvv
Reading ./composer.json
Loading config file /home/<anonymized_user_name>/.composer/config.json
Loading config file /home/<anonymized_user_name>/.composer/auth.json
Loading config file ./composer.json
Checked CA file /etc/pki/tls/certs/ca-bundle.crt: valid
Executing command (<anonymized_repo_path>): git branch --no-color --no-abbrev -v
Executing command (<anonymized_repo_path>): git describe --exact-match --tags
Executing command (<anonymized_repo_path>): git log --pretty="%H" -n1 HEAD
Executing command (<anonymized_repo_path>): hg branch
Executing command (<anonymized_repo_path>): fossil branch list
Executing command (<anonymized_repo_path>): fossil tag list
Executing command (<anonymized_repo_path>): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /home/<anonymized_user_name>/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading <anonymized_repo_path>/vendor/composer/installed.json
Loading plugin Composer\Installers\Plugin
Loading plugin cweagans\Composer\Patches
Loading plugin DrupalComposer\DrupalScaffold\Plugin
Loading plugin Hussainweb\DrupalComposerHelper\ComposerPlugin
Running 1.7.0 (2018-08-03 15:39:07) with PHP 7.1.20 on Linux / 2.6.32-896.16.1.lve1.4.53.el6.x86_64
Reading /home/<anonymized_user_name>/.composer/cache/files/asm89/stack-cors/683f81d3de76c2fa884430ca1c7c355e52404281.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/asm89/stack-cors_compare/87b786bda4593977a6095d9a1cbaf41c' -d '<anonymized_repo_path>/vendor/composer/5f8115e4'
Reading /home/<anonymized_user_name>/.composer/cache/files/caxy/php-htmldiff/4ee920abc68ed8921fea86b41e5c3076da7a04fd.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/caxy/php-htmldiff_compare/2d4ed40b49357d8c2e17bf0e78eb7d0f' -d '<anonymized_repo_path>/vendor/composer/b0c2e162'
Reading /home/<anonymized_user_name>/.composer/cache/files/composer/installers/618182c0943136f2519e53d261e02fe487123eec.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/composer/installers_compare/1d46bef86a8c1314e036811630b75fa3' -d '<anonymized_repo_path>/vendor/composer/d1b9a7a6'
Reading /home/<anonymized_user_name>/.composer/cache/files/composer/semver/5d487551fbabb57043e277a23ce029d2980866aa.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/composer/semver_compare/0b1e8d6d3a556037f468fc0f4fdab56d' -d '<anonymized_repo_path>/vendor/composer/b53fbefe'
Reading /home/<anonymized_user_name>/.composer/cache/files/cweagans/composer-patches/e52aa1136742589c46081f384fa25fdf7adde5d2.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/cweagans/composer-patches_compare/2508ab1dbe29ab83a4d9e88c9dc83136' -d '<anonymized_repo_path>/vendor/composer/26bfb4c8'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/annotations/3da430fa29a6f8acc12f9aa7ae3103c147fff703.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/annotations_compare/0b287acfa59edb08c09dd64424c9e8f4' -d '<anonymized_repo_path>/vendor/composer/faf68bdd'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/cache/c47e91825203c4563554336290e57a5a0f561094.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/cache_compare/f570d77dfcc865f9d52e54842f4c150b' -d '<anonymized_repo_path>/vendor/composer/6e6b75a9'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/collections/bf763739f87df0db0fb18f9bc5af545e52d77106.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/collections_compare/00b67a23921feeb1516ba9160cb71364' -d '<anonymized_repo_path>/vendor/composer/de10ebfb'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/common/2fbb7d783f6d395b36e6fb659a3cf8c8ea72b982.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/common_compare/0333e0ad1f0222ef72251c3438949e16' -d '<anonymized_repo_path>/vendor/composer/53a7b80a'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/event-manager/afc495a452489ecd8ed3fe027cea42845a369865.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/event-manager_compare/a44f4f8b26a66c9af5e734df7c72acde' -d '<anonymized_repo_path>/vendor/composer/42b27e94'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/inflector/96f70d98c54c3c090f209a296e93039e2ac01a39.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/inflector_compare/7e7f83cd319eb902bf2f06f6171b8c3b' -d '<anonymized_repo_path>/vendor/composer/93fa6808'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/lexer/7729c21de67e5610f228d5bf8d14b3d474690743.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/lexer_compare/ce8cd50ff979297daf72172c281f2b86' -d '<anonymized_repo_path>/vendor/composer/42ffd670'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/persistence/cecab1a6a349a7160e0c7a9e17e9bcc199ced1f7.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/persistence_compare/bd49678742d8d112807936d40c7e0bc5' -d '<anonymized_repo_path>/vendor/composer/c9c0a6b9'
Reading /home/<anonymized_user_name>/.composer/cache/files/doctrine/reflection/276d722ea54059b10cec2143dbe2ae894d582fcc.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/doctrine/reflection_compare/8f0fe7f622c16935289a5c427b6277de' -d '<anonymized_repo_path>/vendor/composer/ad1a9f4f'
Reading /home/<anonymized_user_name>/.composer/cache/files/drupal-composer/drupal-scaffold/fc0822ef318b329fc955683cf959141321c93a5a.zip from cache
Executing command (CWD): unzip -qq '<anonymized_repo_path>/vendor/drupal-composer/drupal-scaffold_compare/0e22f5965f1ad84168df973f723004a2' -d '<anonymized_repo_path>/vendor/composer/e3765c64'
Reading /home/<anonymized_user_name>/.composer/cache/files/drupal/addtoany/3a85b4fe5fa99ae87e8761c37bc76248db8f1043.zip from cache
Executing command (CWD): unzip -qq 'web/modules/contrib/addtoany_compare/05d8a5b542522e4338f8e8461feddc88.zip' -d '<anonymized_repo_path>/vendor/composer/959d99ff'
[ErrorException]
chdir(): No such file or directory (errno 2)
Exception trace:
() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/src/Composer/Package/Comparer/Comparer.php:73
Composer\Util\ErrorHandler::handle() at n/a:n/a
chdir() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/src/Composer/Package/Comparer/Comparer.php:73
Composer\Package\Comparer\Comparer->doCompare() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/src/Composer/Downloader/FileDownloader.php:307
Composer\Downloader\FileDownloader->getLocalChanges() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/src/Composer/Command/StatusCommand.php:100
Composer\Command\StatusCommand->execute() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/vendor/symfony/console/Command/Command.php:241
Symfony\Component\Console\Command\Command->run() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/vendor/symfony/console/Application.php:843
Symfony\Component\Console\Application->doRunCommand() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/src/Composer/Console/Application.php:254
Composer\Console\Application->doRun() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/src/Composer/Console/Application.php:103
Composer\Console\Application->run() at phar:///home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar/bin/composer:56
require() at /home/<anonymized_user_name>/<anonymized_composer_path>/composer.phar:24
status [-v|vv|vvv|--verbose]
Executing ‘composer diagnose’ does not reveal any issues.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (9 by maintainers)
Commits related to this issue
- Make sure we chdir back in case update dir is relative, refs #7519 — committed to composer/composer by Seldaek 6 years ago
For me, the problem is solved if I switch to composer 1.7.3, which seems to include this fix.