Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer config -g --absolute -- bin-dir shows wrong path #8452

cjunge-work opened this issue Nov 27, 2019 · 2 comments


Copy link

@cjunge-work cjunge-work commented Nov 27, 2019

I am running Xubuntu 19.10.

Output of composer diagnose:

$ composer global diagnose
Changed current directory to /home/cameron/.config/composer
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking oauth access: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
Checking composer version: OK
Composer version: 1.9.1
PHP version: 7.3.11
PHP binary path: /usr/bin/php7.3

When I run this command:

$ composer config -g --absolute -- bin-dir

I get the following output:


And I expected this to happen:

If I run

$ composer global config --absolute -- bin-dir

I get the expected output.

The help for composer config says:

 -g, --global                   Apply command to the global config file

This comment has been minimized.

Copy link

@alcohol alcohol commented Dec 2, 2019

Can you provide the contents of /home/cameron/.config/composer/composer.json ?

@alcohol alcohol added the Support label Dec 2, 2019

This comment has been minimized.

Copy link

@Seldaek Seldaek commented Dec 7, 2019

Note that the global config accessible through config -g (this config applies to all composer runs, it's the user level config) is not the same as running composer global config (this config is the local config of the composer global "project". That's most likely the reason for your problem. To be fair this is slightly confusing and could be better documented I assume, if you want to PR something that would have helped you that'd be welcome.

@Seldaek Seldaek closed this Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.