For a plugin for Sublime Text I was required to install a composer package globally.
In order to do this I had to run the following command:
composer glo
You can use
composer global config bin-dir --absolute
Example
PATH=$(composer global config bin-dir --absolute --quiet):$PATH
You need --absolute
to get value expanded, and --quiet
to discard diagnostics of composer global changing working directory. This was tested with composer 1.10.16 and 2.0.1.
See https://github.com/composer/composer/issues/9354#issuecomment-716827067