Running composer in a different directory than current

后端 未结 4 932
萌比男神i
萌比男神i 2021-01-31 07:04

I don\'t know if this question has been asked, because searching finds results mostly about moving the libraries installation directory.

I have a globally installed comp

4条回答
  •  旧巷少年郎
    2021-01-31 07:21

    Sure, try composer install -h. There you'll find an option --working-dir (or -d). And that's what you're looking for.

    Then run:

    composer install -d=/home/someuser/myproject
    

    You can find more in composer docs.


    Depending on your operating system, the = might need to be removed:

    composer install -d /home/someuser/myproject
    

提交回复
热议问题