-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
When running a command over SSH (eg. via the --ssh flag or an @-alias), the contents of the command flag appears to be double escaped.
Example:
wp --ssh=foo plugin list --debug
Results in:
Running SSH command: ssh -q 'foo' -t 'wp '\''plugin'\'' '\''list'\'' '\''--debug'\'''
I would expect it to be:
Running SSH command: ssh -q 'foo' -t 'wp plugin list --debug'
The double escaping appears to come from two calls to escapeshellarg, first inside WP_CLI\Runner::run_ssh_command() and secondly within the corresponding condition in WP_CLI\Runner::generate_ssh_command() (and conditions above that for Docker, Vagrant, etc).
Is there a reason for the double escaping that I'm missing?
Reactions are currently unavailable