capistrano / capistrano/composer

PHP binary with arguments

Open
#46 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
182
Forks
47
PR merge metrics
No merged PRs in 30d

Description

On the Task `composer:install_executable` which executes

``` rake
task :install_executable do
on release_roles(fetch(:composer_roles)) do
within shared_path do
unless test "[", "-e", "composer.phar", "]"
composer_version = fetch(:composer_version, nil)
composer_version_option = composer_version ? "-- --version=#{composer_version}" : ""
execute :curl, "-s", fetch(:composer_download_url), "|", :php, composer_version_option
end
end
end
end
```

I need to change the php binary including its arguments.

The default commend which is being executed looks like this:
`curl -s https://getcomposer.org/installer | php`

What I need is:
`curl -s https://getcomposer.org/installer | php56 -d allow_url_fopen=On`

What I already know does not work:
- Can't use the command_map because only the first argument of a execute statement gets resolved with the command_map
- Can't use the workaround with fetch(:default_env).merge!(PATH: '$PATH:/usr/bin/php56 -d allow_url_fopen=On')

The only viable solution I see is the change the lib code `:php` to `fetch(:php)` (or similar) to be able to define the php binary (with its argument) with `set :php, 'php -d allow_url_fopen=On'`. Is this true or am I missing something?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.