Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

v1.17.0 breaks Positron connections: single-quoted `--url` in ProxyCommand reaches the CLI literally ("Premature close")

已关闭 适合新手
#1,153 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@EhabY 已经在做这个了。

开始于 2026年10月15日。

  • #1156 来自 @EhabY —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
shell, typescript, vscode
领域
devtools

调研方向

问题出在扩展程序将 ProxyCommand 行写入生成的 SSH 配置的方式。找到部署 URL 使用单引号进行 shell 转义的位置,并与现有的路径转义方式进行比较,该 issue 称现有方式已经可以正常工作。检查是否有单元测试覆盖生成的 ProxyCommand 字符串,并将其扩展到 URL。完成标准是:URL 以不加引号或双引号的形式输出,现有路径转义保持不变,且测试通过。

由索引模型根据 Issue 内容生成。

描述

bug regression

Regression in v1.17.0; v1.16.4 works. Positron 1.134.0, macOS arm64, Coder v2.34.1.

Every Positron connection fails within ~100 ms:

[Trace] Spawning ProxyCommand: …/coder-darwin-arm64 --token= --url 'https://coder.example.com' --use-keyring=true ssh --disable-autostart --stdio …
[Error] Error resolving authority
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close

VS Code (Microsoft Remote-SSH) and plain ssh from a terminal work with the same generated config.

Cause

v1.17.0 POSIX-shell-quotes the URL in the ProxyCommand (--url 'https://…'); v1.16.4 wrote it bare. Positron's built-in open-remote-ssh doesn't run ProxyCommand through a shell: it tokenizes the ssh_config value (honoring double quotes only) and calls child_process.spawn(cmd, args). The CLI therefore gets the quotes literally and exits at flag parsing:

invalid argument "'https://coder.example.com'" for "--url" flag: parse "'https://coder.example.com'": first path segment in URL cannot contain colon

open-remote-ssh discards the child's stderr, so the user sees only "Premature close". Other editors built on open-remote-ssh are presumably affected the same way.

Workaround

Install v1.16.4 and turn off auto-update for the extension. There's no settings-level workaround: coder.sshConfig can't override ProxyCommand, and the conf file is rewritten on every connect.

Suggested fix

Quote the URL the way the paths already are (bare when it matches the safe character set, double quotes otherwise). Since 1.17.0 already rejects deployment URLs containing shell metacharacters, the single quotes don't add safety, and double quotes parse correctly in both OpenSSH and open-remote-ssh.

主要语言
TypeScript
星标
132
派生
48
平均合并
1 天 18 小时
30 天内合并 PR
29

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/vscode-coder 的其他 Issue

查看 coder/vscode-coder 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。