wa0x6e / Fresque

A command line tool to manage your php-resque workers
MIT License
128 stars 56 forks source link

Broken bin when install from Composer on Debian #20

Closed SonicGD closed 11 years ago

SonicGD commented 11 years ago

When i install Fresque from composer on Debian, i can't start it from vendor/bin/fresque because of error:

root@debian:/tmp/cg2# ./vendor/bin/fresque
./vendor/bin/
Could not open input file: ./vendor/bin//lib/init.php

vendor/bin/fresque is just a symlink to vendor/fresque/fresque/fresque

fresque -> ../fresque/fresque/fresque

So, when it try to do this

LIB=${0/%fresque/}
exec php -q ${LIB}/lib/init.php "$@"

${LIB) is vendor/bin/ and, of course, vendor/bin//lib/init.php doesn't exist.

If i install on windows or windows shared folder in linux system (without symlinks), Composer create binary file like this:

#!/usr/bin/env sh
SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd '../fresque/fresque'
BIN_TARGET="`pwd`/fresque"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"

and it works like it should.

SonicGD commented 11 years ago

Thanks!