Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#149 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@aliarain 已经在做这个了。

开始于 2026年10月22日。

评估

难度
4/5
预计耗时
1-2 天
新手友好度
56/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
powershell, shell

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Shell
星标
104
派生
8
平均合并
2 小时 46 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CommandCodeAI/desktop 的其他 Issue

查看 CommandCodeAI/desktop 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。