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
The solution is to appropriately quote when we generate $script_to_execute. A basic version of this would not be too hard, but subtleties of escaping abound.
Would be easily resolved in a rewrite not in the shell.
Our tests expect that try "echo hi>foo" will preserve the redirect and that try "echo hi; echo bye" will preserve the pair of commands.
I don't see how we can support both this existing behavior and appropriate quoting of things like bash -c. An advantage of the current behavior is that you can run try "bash -c \"echo hi\"" and get the right behavior... whereas it's not clear how to preserve the shell syntax with this modified behavior.
Unless you have a better idea, I'll delete the branch and close the issue.
try bash -c "echo a"actually executes
bash -c echo a