github / github/copilot-cli

Windows: Ctrl+G cannot launch code-insiders --wait

未关闭
#3,733 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area:configuration area:platform-windows
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Bug

On Windows, `Ctrl+G` cannot launch VS Code Insiders when `$EDITOR` is set to the standard wait command:

```powershell
$env:EDITOR = 'code-insiders --wait'
```

The same command works directly from PowerShell.

### Repro

```powershell
$env:EDITOR = 'code-insiders --wait'
code-insiders --wait # works
copilot
# Press Ctrl+G
```

### Expected

Copilot CLI opens VS Code Insiders and waits for the prompt file to close.

### Actual

```text
✗ Error: Editor 'code-insiders --wait' not found. Check your $COPILOT_EDITOR, $VISUAL, or $EDITOR environment variable.
```

Using a `.cmd` wrapper also fails with `spawn EINVAL`.

### Notes

`code-insiders` resolves to a Windows `.cmd` shim, so this appears related to #1882. The fix is likely to handle Windows `.cmd` / `.bat` editor commands through `cmd /c` or `shell: true`, and to support editor commands with arguments such as `--wait`.

### Environment

- Windows
- PowerShell
- Copilot CLI 1.0.60
- VS Code Insiders

贡献指南

打开贡献指南

调研方向

阅读相关的 issue #1882,并跟踪 CLI 在 Windows 上如何解析和启动编辑器命令。使用 `code-insiders --wait` 和 `.cmd` wrapper 重现 PowerShell 情况,然后验证编辑器能够打开,并等待 prompt 文件关闭且不会出现报告中的错误。

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

评估

技术栈
powershell, shell
领域
cli, operating-systems
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
56/100

把新 issue 发到你的邮箱

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