Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Variable not changing #45

Open
KyreusR opened this issue Jul 29, 2016 · 3 comments
Open

PHP Variable not changing #45

KyreusR opened this issue Jul 29, 2016 · 3 comments

Comments

@KyreusR
Copy link

KyreusR commented Jul 29, 2016

During the deploy capistrano try to download composer with "php" but it should use "php7cli".
I've added these lines in my deploy.rb:
SSHKit.config.command_map[:php] = "php7cli" SSHKit.config.command_map[:composer] = "php7cli #{shared_path.join("composer.phar")}"

php7cli is and alias in my .bashrc. I've tried it with an complete path but still it doesnt work.

I've also tried this in my production.rb:
etch(:default_env).merge!(PATH: '$PATH:usr/local/bin/php7-70STABLE-CLI')

Still... No luck for me

@alister
Copy link

alister commented Aug 3, 2016

It's exceeding unlikely that Capistrano would run PHP via an bash-alias. Maybe putting the full path to the php7cli command, such as /usr/local/bin/php7-70STABLE-CLI/php7cli for the :php variable would work, or else creating a symlink from php7cli to /usr/local/bin/php (or similar), would allow it to be run from a standard path and filename. There may also be some form of OS-level symlink alias available (under an 'alternative' system, or the like)

@fuegas
Copy link

fuegas commented Mar 16, 2017

@msgeburt this is related to what is described in #46. Only the first argument of execute is resolved with command_map, so setting an alternative for php in command_map won't have any effect.

@KyreusR
Copy link
Author

KyreusR commented Mar 20, 2017

@fuegas sry im not in touch with this problem anymore. i had a bad work around but actually im not sure how i did it. But i didnt shared the workaround because i wouldnt recommend it to anyone^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants