From 72c8a47ac977d1bea68c3f6a94553f91379d7537 Mon Sep 17 00:00:00 2001 From: chengyongru <2755839590@qq.com> Date: Sun, 5 Jul 2026 21:13:06 +0800 Subject: [PATCH] docs: update Windows exec shell gotcha Maintainer edit: document that Windows exec defaults to PowerShell and cmd.exe syntax now requires shell='cmd'. --- .agent/gotchas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.agent/gotchas.md b/.agent/gotchas.md index 61765b11..588d957a 100644 --- a/.agent/gotchas.md +++ b/.agent/gotchas.md @@ -16,7 +16,7 @@ Example valid usage: ## Windows Compatibility nanobot explicitly supports Windows. Key differences to keep in mind: -- `ExecTool` uses `cmd /c` on Windows instead of `sh -c` (`shell.py`). +- `ExecTool` defaults to PowerShell on Windows (`pwsh` when available, otherwise Windows PowerShell); pass `shell="cmd"` for cmd.exe syntax or cmd built-ins (`shell.py`). - `cli/commands.py` forces `sys.stdout`/`stderr` to UTF-8 on startup to handle emoji and multilingual input. - MCP stdio server commands are normalized for Windows path separators (`mcp.py`). - Always use `pathlib.Path` for path manipulation; do not assume `/` separators.