Where to find composer's global packages?

后端 未结 9 1472
星月不相逢
星月不相逢 2021-01-30 20:12

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         


        
相关标签:
9条回答
  • 2021-01-30 20:57

    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

    0 讨论(0)
  • 2021-01-30 20:58

    ~/.config/composer/vendor/bin/laravel adding this to my bashrc file as a alias works on ubuntu 20.04

    0 讨论(0)
  • 2021-01-30 20:59

    Ubuntu 16.04: ~/.composer/vendor

    Ubuntu 18.04: ~/.config/composer/vendor

    0 讨论(0)
提交回复
热议问题