github / github/copilot-cli

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

Aperta
#3,733 1 commento 1 reazione 0 assegnatari Vedi su GitHub
area:configuration area:platform-windows
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Leggi l’issue correlata #1882 e traccia il modo in cui la CLI risolve e avvia i comandi dell’editor su Windows. Riproduci il caso PowerShell con `code-insiders --wait` e il wrapper `.cmd`, quindi verifica che l’editor si apra e attenda la chiusura del file di prompt senza gli errori segnalati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, shell
Ambito
cli, operating-systems
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
56/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.