Closed davo-canva closed 4 months ago
Thank you, and good catch!
I believe we will need to handle Windows differently like we are doing in the JetBrains plugin: https://github.com/coder/jetbrains-coder/blob/main/src/main/kotlin/com/coder/gateway/util/Escape.kt
The documentation for the header command setting says:
However, if the command line itself references
$CODER_URL
, when connecting via the VSCode extension the variable will get substituted before thecoder
CLI can set the variable when running the header command, which is contrary to the behaviour of the JetBrains plugin. This is because the VSCode extension is currently writing the header command into the SSH config'sProxyCommand
with double quotes, allowing the shell spawned byssh
to substitute$CODER_URL
(with the empty string).This ensures environment variable references within the header command are not substituted before the
coder
binary can receive them, by using single quotes rather than double quotes in theProxyCommand
.Tested on a macOS client.