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
I solved the problem like this in a Cygwin/XAMPP setup:
Install composer.phar
to XAMPP's php
directory
Create an executable Bash script named composer
in XAMPP's php
directory:
#!/bin/bash
script_dir=$(cygpath -w $(dirname $0))
php "$script_dir/composer.phar" $@
It's important to use cygpath -w
to convert the path to a path in Windows form.
Make sure XAMPP's php
directory is accessible in Cygwin's $PATH
:
$ export PATH=$PATH:/cygdrive/i/dev/server/xampp/php
Now it's possible to call composer
from anywhere you like without problems:
$ composer -V
Composer version 264f433ca3f007d39568b3722b4bf418f58ba15b