- Notifications
You must be signed in to change notification settings - Fork23
fix: specify--header-command
when runningcoder start
#526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR refactors the way header command arguments are handled when running the "coder start" command so that the necessary "--header-command" argument is always provided. Key changes include:
- Adding a new helper function escapeCommandArg in util.ts for escaping command arguments.
- Replacing getHeaderCommand with getHeaderArgs in remote.ts and updating the command formation.
- Adjusting headers.ts and api.ts to support the new header arguments generation and propagation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/util.ts | Added escapeCommandArg for safely escaping command arguments. |
src/remote.ts | Updated header argument handling to use getHeaderArgs. |
src/headers.ts | Introduced getHeaderArgs to generate escaped header arguments. |
src/api.ts | Spread header arguments into the arguments list for coder start. |
bcpeinhardt commentedJun 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@aslilac would you mind adding a note to the changelog as well? |
CHANGELOG.md Outdated
@@ -12,6 +12,7 @@ | |||
- Multiple open instances of the extension could potentially clobber writes to | |||
`~/.ssh/config`. Updates to this file are now atomic. | |||
- Add support for `anysphere.remote-ssh` Remote SSH extension. | |||
- Use `--header-command` properly when starting a workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think you meant to put this in the unreleased section!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
it's dark and scary in here, I got lost 😭
gonna wait to merge this until tomorrow. we're talking with the customer this is for and gonna try to do some testing. |
d70a586
intomainUh oh!
There was an error while loading.Please reload this page.
Closes#499
The
coder start
command can't always work properly without specifying these args (eg., getting past proxies). This refactors the code a little to make it easier to get the right argument values, and passes them tocoder start
.