I have a question about the programming tool composer which is installed as an executable in /usr/local/bin/composer
on 3 different machines that I use between work and home. According to:
composer help global
COMPOSER_HOME is c:Users<user>AppDataRoamingComposer on Windows
and /home/<user>/.composer on unix systems.
Note: This path may vary depending on customizations to bin-dir in
composer.json or the environmental variable COMPOSER_BIN_DIR.
But both of these are empty:
echo $COMPOSER_HOME
echo $COMPOSER_BIN_DIR
When I run:
composer global require <package>
It installs to /home/<user>/.config/composer/vendor/bin
only on my Ubuntu 16.04 desktop, but everywhere else it installs appropriately to /home/<user>/.composer/vendor/bin
Why is it installing to ~/.config
instead of ~/.composer
and not setting the COMPOSER_HOME
variable?
I notice this because I source my common dotfiles which includes the global composer bin path. I know I can workaround this by manually setting COMPOSER_HOME
in my bashrc, but I would rather understand why this is happening in the first place.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…