Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Terminal tool on windows using `cmd.exe` instead of powershell

Đang mở
#149 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@aliarain đang làm issue này rồi.

Từ ngày 22/10/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
powershell, shell

Hướng nghiên cứu

The report identifies the terminal tool's use of cmd.exe on Windows and requests PowerShell by default, with optional shell selection. Start by locating how the desktop app launches its terminal tool and how it selects a shell on Windows. Done means the tool uses the expected shell and the reproduction command behaves as expected; the issue does not name files or tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug p1
GUI version

0.1.56

Operating system

Windows

Reproduction steps
  1. let AI run this command: echo "SHELL=$SHELL"
  2. See terminal printing the string literally, including the "
Expected behavior

Use powershell (and pwsh when possible) for terminal tool. Would be even better if user can choose which one to use (powershell/pwsh/git-bash)

Actual behavior

Terminal tool using cmd.exe

Screenshots, recordings, or sanitized logs

AI report:

## The active shell for `shell_command`: **cmd.exe**
`C:\WINDOWS\system32\cmd.exe`

**Evidence (each probe independently rules the others out):**
| Probe | Result | Meaning |
|---|---|---|
| `echo %COMSPEC%` | `C:\WINDOWS\system32\cmd.exe` | cmd-style `%VAR%` expansion; PowerShell/bash would leave it literal |
| `echo "SHELL=$SHELL"` | printed the string **literally** | no `$VAR` expansion → not bash, not PowerShell |
| `ver` | `Microsoft Windows [version 10.0.26300.9711]` | cmd's built-in banner |
| `&` / `&&` chaining | worked | cmd command separator semantics |
| `powershell` tool parent process | `C:\WINDOWS\system32\cmd.exe` | the harness spawns cmd.exe, which then invokes PowerShell |

## The other three candidates — all present, none active
- **Windows PowerShell 5.1 (Desktop)** — `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe`, v5.1.26100.9711, CLR 4.0.30319. This is what the dedicated `powershell` tool runs (child of cmd.exe).
- **PowerShell 7 (`pwsh`)** — `C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\pwsh.exe`, reports `Core 7.6.7`. Store app-execution-alias install, on PATH but not the shell in use.
- **Git Bash** — `C:\Program Files\Git\bin\bash.exe` exists (MSYS2/MINGW64, `MINGW64_NT-10.0-26300`, bash 3.6.10), but `C:\Program Files\Git\bin` is **not in PATH**, so `where bash` fails. Callable by absolute path only.

**Bottom line:** the terminal is **cmd.exe**. For richer scripting use the `powershell` tool (5.1 Desktop) or invoke `pwsh` for PowerShell 7.
Safety check
  • I removed credentials and private project information from this report.
Ngôn ngữ chính
Shell
Star
104
Fork
8
Merge trung bình
2 giờ 46 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CommandCodeAI/desktop

Tất cả issue của CommandCodeAI/desktop

Issue tương tự

Thêm issue về Shell/Bash

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.