-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Copilot CLI uses Unix-only commands on Windows #2981
Copy link
Copy link
Open
Labels
area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows TerminalWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminalarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Metadata
Metadata
Assignees
Labels
area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows TerminalWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminalarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Type
Fields
Give feedbackNo fields configured for Bug.
Describe the bug
While running on Windows PowerShell, Copilot piped output to
head -900, a Unix command that does not exist in PowerShell. The command failed with: "The term 'head' is not recognized as a name of a cmdlet, function, script file, or executable program." Copilot had access to the environment context indicating Windows_NT as the OS, yet still generated a Unix-style command. The equivalent PowerShell would beSelect-Object -First 900Affected version
GitHub Copilot CLI 1.0.36
Steps to reproduce the behavior
Repro Steps:
JSON file over 150 records
Expected behavior
Copilot should detect the OS, Windows_NT is provided in environment, and use PowerShell commands. For example, to limit output to 900 lines, it should something along the lines of:
| Select-Object -First 900Instead, Copilot generated the command:
python -c "..." 2>&1 | head -900This failed with:"The term 'head' is not recognized as a name of a cmdlet, function, script file, or executable program."
Additional context
No response