github / github/copilot-cli

Copilot CLI internal PowerShell tool fails to spawn pwsh.exe on Windows (ENOENT)

Đang mở
#2,355 6 bình luận 6 reaction 0 người được giao Xem trên GitHub
area:non-interactive area:platform-windows
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

The Copilot CLI works correctly for interactive prompts, but its internal PowerShell tool runtime fails to execute pwsh.exe on this Windows machine.
PowerShell 7 is installed, accessible, and resolves correctly via PATH. The failure is limited to Copilot CLI’s internal command execution (Node.js spawn).
This appears to be a Copilot CLI tool runtime issue rather than an environment misconfiguration.

### Affected version

Copilot CLI: v1.0.12 installed via winget

### Steps to reproduce the behavior

Steps to Reproduce

Install PowerShell 7.6.0 via winget
Ensure pwsh.exe is accessible via PATH
Install Copilot CLI via winget
Run a Copilot CLI workflow that requires internal PowerShell execution

### Expected behavior

Copilot CLI should be able to spawn pwsh.exe and execute PowerShell commands successfully.

### Additional context

The following commands work correctly when executed directly in PowerShell:
where pwsh
(Get-Command pwsh).Source

Both resolve to:
C:\Program Files\PowerShell\7\pwsh.exe
pwsh -NoLogo -Command "$PSVersionTable.PSVersion"

Environment

OS: Windows (64-bit)
Copilot CLI: v1.0.12 installed via winget
Installation type: WinGet / MSIX
PowerShell: 7.6.0 (x64)

Installation path: C:\Program Files\PowerShell\7\pwsh.exe
PowerShell x86 was removed to avoid multi-architecture conflicts
The issue persists even with a clean PATH and fresh sessions
This suggests a Copilot CLI internal tool runtime / MSIX sandbox limitation
Junctions and PATH fixes do not resolve the issue

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.