8000 Prevent variable expansion in header command · Issue #338 · coder/jetbrains-coder · GitHub
[go: up one dir, main page]

Skip to content
Prevent variable expansion in header command #338
Closed
@code-asher

Description

@code-asher

It is better to let them expand when they run in the Coder CLI because one might use $CODER_URL which will not yet be set if it is expanded before the proxy command is actually ran. We should pass the header command literally to the CLI so the expansion happens in that context (where CODER_URL will be set) instead.

I think we can do this by simply wrapping the --header-command value in single quotes, although I am not sure if Windows has a different story.

As far as bash-like shells go, wrapping in single quotes means we should also escape single quotes already in the header command which means using something like '"'"' or '\'', I believe.

Related: #335 (the header command contains $CODER_URL which expands to nothing because it is not set in the context of the Java process making the SSH connection, causing the header command and consequently the proxy command and then the connection itself to fail).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0