See https://github.com/eclipse-theia/theia/pull/6508#discussion_r353293561
The Theia code handling runInTerminal requests will try to send arguments to an interactive shell. This breaks down when escaping is needed. The issue seems to come from reusing actual shell processes instead of reusing terminal widgets.
@marechal-p please explain how to reproduce, i.e. share a concrete command or a setup
Example: If I want to execute something like ["node", "-e", "console.log(1 + 2)"] then the current code will just write node -e console.log(1 + 2). If you try to run that in a unix shell it will fail.
After looking into how we can get processes to spawn, not going through a shell means that aliases or programs in the PATH variable won't work. So we are ought to escape commands indeed.
Most helpful comment
Example: If I want to execute something like
["node", "-e", "console.log(1 + 2)"]then the current code will just writenode -e console.log(1 + 2). If you try to run that in a unix shell it will fail.