deployer
deployer copied to clipboard
Spaces in ssh_arguments are not respected
- Deployer version: 7.0.1
- Deployment OS: Ubuntu 22.04
host('123.123.123.123')->set('ssh_arguments', ['-o ProxyCommand="ssh [email protected]"']);
When setting an SSH argument on a host that includes a space, the connectionOptionsArray method calls explode on each argument with a space as the split character. Unfortunately, this explode doesn't respect spaces within protected whitespace e.g. between the "ssh" and "user@bastion" in the example above. This means the argument is split here, escaped again, and results in a bash error:
/bin/sh: 1: Syntax error: Unterminated quoted string
Is it possible to remove the explode, or if it's required, make sure it respects spaces within quote fences?
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
I see. Probably we need to refactor this part to keep old syntax and remove explode.
see my comments on https://github.com/deployphp/deployer/issues/3558