You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:spawn connect <id> -- bash -lc "<command string>" does not deliver the command string as a single argument to bash -lc. When the command contains spaces (i.e. any real command), the remote side fails with:
bash: -c: option requires an argument
Repro:
# fails — the string after -lc is re-split, so -c gets an empty/partial arg
spawn connect my-instance -- bash -lc "echo hello && echo world"# → bash: -c: option requires an argument
Expected: the quoted command runs as one script, printing hello\nworld.
Impact: any non-trivial remote command via connect -- bash -lc (pipes, &&, quotes) is unusable. This bites automation that drives instances programmatically (e.g. aws ecr get-login-password | docker login ... && docker pull ...).
Workaround that works: feed the script over stdin instead of argv —
This reliably preserves the payload, which suggests connect's handling of the post--- argv (or how it assembles the remote SSH command) is re-splitting/again-parsing the arguments rather than passing them through verbatim.
Ask: pass the post--- argument vector to the remote shell without re-splitting (e.g. exec-style / properly quoted), so -- bash -lc '<one arg>' behaves as it does over plain ssh.
Activity
fix(connect): pass post-`--` argv verbatim, don't re-split (#369) (#377)
fix(cmd): exit non-zero when a confirmation prompt is declined; fix c…