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 摘要。