docs: update Windows exec shell gotcha

Maintainer edit: document that Windows exec defaults to PowerShell and cmd.exe syntax now requires shell='cmd'.
This commit is contained in:
chengyongru
2026-07-06 12:11:25 +08:00
committed by Xubin Ren
parent 122cf4213b
commit 72c8a47ac9
+1 -1
View File
@@ -16,7 +16,7 @@ Example valid usage:
## Windows Compatibility ## Windows Compatibility
nanobot explicitly supports Windows. Key differences to keep in mind: 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. - `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`). - MCP stdio server commands are normalized for Windows path separators (`mcp.py`).
- Always use `pathlib.Path` for path manipulation; do not assume `/` separators. - Always use `pathlib.Path` for path manipulation; do not assume `/` separators.