I am trying to do a composer install
on a new Drupal project, and it fails with the following error:
[RuntimeException]
Failed to clone https://github.com/jeromegn/Backbone.localStorage.git via https, ssh, git protocols, aborti
ng.
- https://github.com/jeromegn/Backbone.localStorage.git
Cloning into 'web/libraries/backbone.localstorage'...
done.
sh: line 0: cd: web/libraries/backbone.localstorage: No such file or directory
- git@github.com:jeromegn/Backbone.localStorage.git
Cloning into 'web/libraries/backbone.localstorage'...
done.
sh: line 0: cd: web/libraries/backbone.localstorage: No such file or directory
- git://github.com/jeromegn/Backbone.localStorage.git
Cloning into 'web/libraries/backbone.localstorage'...
done.
sh: line 0: cd: web/libraries/backbone.localstorage: No such file or directory
System details:
macOS 10.12.6
git version 2.18.0
Composer version 1.6.5 2018-05-04 11:44:59
PHP 7.0.30 (cli) (built: Jun 22 2018 00:52:06) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30, Copyright (c) 1999-2017, by Zend Technologies
It's puzzling because my co-workers do not get this error, and they have similar machines, running the same OS, and composer/php/git version.
I have tried the following to no avail:
brew reinstall git
rm -rf vendor
composer clear-cache
composer.json
(the exact same error appears, even if cache is cleared) --prefer-dist
flag --prefer-source
flag I've also tried running composer update
, and I get this error:
[RuntimeException]
Failed to execute git clone --no-checkout '/Users/delucac/.composer/cache/vcs/https---git.drupal.org-project-ma
illog/' 'web/modules/contrib/maillog' --dissociate --reference '/Users/delucac/.composer/cache/vcs/https---git.
drupal.org-project-maillog/' && cd 'web/modules/contrib/maillog' && git remote set-url origin 'https://git.drup
al.org/project/maillog' && git remote add composer 'https://git.drupal.org/project/maillog'
Cloning into 'web/modules/contrib/maillog'...
done.
sh: line 0: cd: web/modules/contrib/maillog: No such file or directory
I've Googled around and found several threads with the same/similar issue, but no resolution.
Any help would be greatly appreciated.
I figured out the problem.
I'm not sure why, and the error doesn't really indicate this, but removing this line from my .bashrc
fixes the issue:
export CDPATH='~:~/Sites'
This provides "auto-bookmarks" to cd
completion for any top-level directory in either Home or Sites, and obviously modifies some path, but I'm still confuses why this caused a problem.
If anyone has any further insight into this I'd be grateful.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.