capistrano / composer

Capistrano extension for Composer tasks
MIT License
183 stars 48 forks source link

Make run command working #17

Closed ismailasci closed 10 years ago

ismailasci commented 10 years ago

The install_executable task installs composer inside the shared folder within the name of composer.phar which is a php packages without execute rights. So when run command runs it ends up with an error like composer: command not found. The problems are:

This PR solves the file name and makes composer executed through php.

swalkinshaw commented 10 years ago

Not sure about this since it would also break for anyone not using install_executable. Just having the command as composer is the simplest default since we can't make it for everyone out of the box.

Also, this is actually documented in the README https://github.com/capistrano/composer#installing-composer-as-part-of-a-deployment

Keeping the command as just composer also makes it easier to override it with command_map. The way you have it right now, you'd have to override php in command_map which you really don't want to do.

ismailasci commented 10 years ago

Argh I missed that part in the documentation! I first looked for a parameter to change composer path/name but could not find and ended up overriding the task.

Even though install_executable won't make composer.phar executable and running it without php will end up with an error or am I missing something?

swalkinshaw commented 10 years ago

Maybe not. We can update the docs to add php:

SSHKit.config.command_map[:composer] = "php #{shared_path.join("composer.phar")}"
peterjmit commented 10 years ago

See my linked documentation update commit - I think this can be closed now?

ismailasci commented 10 years ago

Yes, this should be ok now. Thanks!