Composer & Cygwin

后端 未结 13 2177
醉酒成梦
醉酒成梦 2021-01-30 04:22

Composer doesn\'t run correctly in Cygwin if you try to install it \"globally\".

Putting composer.phar into /usr/local/bin/composer, then trying to run it will result in

13条回答
  •  -上瘾入骨i
    2021-01-30 05:05

    I had the same problem. After reading the final instruction from composer installer, it says that the $PATH variable should be reloaded. I rebooted my computer and then linked the Composer bin to /usr/local/bin.

    First locate the composer bin : /cygdrive/c/ProgramData/ComposerSetup/bin/composer

    Then according to Seldaek answer, after trying a non-working symlink, I did :

    nano /usr/local/bin/composer

    #!/bin/sh
    /cygdrive/c/ProgramData/ComposerSetup/bin/composer $@
    

    chmod +x /usr/local/bin/composer

    And it's working.

提交回复
热议问题