diff --git a/lib/capistrano/tasks/composer.rake b/lib/capistrano/tasks/composer.rake index 10df381..c880c64 100644 --- a/lib/capistrano/tasks/composer.rake +++ b/lib/capistrano/tasks/composer.rake @@ -11,14 +11,15 @@ namespace :composer do task :install_executable do on release_roles(fetch(:composer_roles)) do within shared_path do + composer_php = fetch(:composer_php, :php) composer_version = fetch(:composer_version, nil) composer_version_option = composer_version ? "-- --version=#{composer_version}" : "" if test "[", "!", "-e", "composer.phar", "]" - execute :curl, "-s", fetch(:composer_download_url), "|", :php, composer_version_option + execute :curl, "-s", fetch(:composer_download_url), "|", composer_php, composer_version_option elsif composer_version - current_version = capture(:php, "composer.phar", "-V", strip: false) + current_version = capture(composer_php, "composer.phar", "-V", strip: false) unless current_version.include? "Composer version #{composer_version} " - execute :curl, "-s", fetch(:composer_download_url), "|", :php, composer_version_option + execute :curl, "-s", fetch(:composer_download_url), "|", composer_php, composer_version_option end end end