-
Notifications
You must be signed in to change notification settings - Fork 34
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
Option to use './wp-cli.phar' instead of 'wp' command? #18
Comments
I was able to work around it by writing a small bash script that falls back to the # Use .phar file if bin/ executable is not available
#
# This is useful whenever you're using a host that
# doesn't let you install executables
#
{ wp: "wp-cli.phar" }.each do |cmd, exe|
SSHKit.config.command_map[:"#{cmd}"] = "$(if [ $(which #{cmd}) ]; then echo '#{cmd}'; else echo 'php #{shared_path.join(exe)}'; fi)"
end |
I did the trick with the default env:
But works only if setted on env config file, not main |
I am also having an issue with this, unfortunately it seems that the commands are only replaced at the front of the For a workaround I can unzip the file and then import it, but that required making another file and having to clean up both the compressed and decompressed files. |
Any new about this issue? @ezekg is possible to make a PR for that? |
SSKKit only allows using `command_map` on the first argument of the `execute` method. Trying to use this on a shared staging environment where I am unable to install `wp` as a global command resulted in using: ```ruby SSHKit.config.command_map[:wp] = "$(if [ $(which wp) ]; then echo 'wp'; else echo 'php55-cli #{shared_path.join(wp-cli.phar)'; fi)" ``` (See lavmeiker#18)
Has anyone of you found a valuable workaround? |
1 similar comment
Has anyone of you found a valuable workaround? |
I will work on a solution to install the wp-cli.phar into the shared folder and use it from there if no wp-cli is installed on the remote system. See here: https://github.com/lavmeiker/capistrano-wpcli/milestones/LUX |
SSKKit only allows using `command_map` on the first argument of the `execute` method. Trying to use this on a shared staging environment where I am unable to install `wp` as a global command resulted in using: ```ruby SSHKit.config.command_map[:wp] = "$(if [ $(which wp) ]; then echo 'wp'; else echo 'php55-cli #{shared_path.join(wp-cli.phar)'; fi)" ``` (See lavmeiker#18)
Are there any updates on this? Right now I get those errors, so it seems, that there definitely was some progress. :)
Weird thing is, that This is relevant part of my
Any ideas? Thanks in advance! |
This is pushed to the lux branch right now. You are now able to easily set the location of the wp-cli.phar file via i.e.:
Will release it shortly. |
Awesome, works for me! |
Some of my clients use shared hosting (Godaddy), so I'm not able to install the
bin/
executable, unfortunately. Is there a option I can use to execute a local./wp-cli.phar
file instead? If not, would you be interested in a pull request?The text was updated successfully, but these errors were encountered: