xswt442-cmd/dsh-unsandboxed-winbash ↗★ 0
dsh-unsandboxed-winbash
Adds a Git Bash (MSYS2) tool to dsh on Windows. Git Bash cannot start under the harness file sandbox (its MSYS runtime needs a named pipe the restricted token refuses), so this tool spawns it outside the sandbox and says so in its own description. pwsh, the permission presets and the fs tools keep their sandbox unchanged. 适合Windows用户,解决Git Bash在沙箱环境下无法启动的问题。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xswt442-cmd/dsh-unsandboxed-winbashREADME
Read the full README ↗配置
- insert:
- id: tool-winbash
name: dsh-unsandboxed-winbash/tool
config:
bashPath: '' # 显式指定 Git Bash 路径(默认自动发现)
gitPathPrefix: true # 把 Git 的 usr\bin / mingw64\bin / cmd 前置到 PATH
extraPath: '' # 额外 PATH 前缀,';' 分隔(排在最前)
drainMs: 250 # 子进程退出后等待输出排空的上限
timeoutMs: 120000 # 命令默认超时
maxTimeoutMs: 600000
maxOutputBytes: 64000
maxSpillBytes: 67108864
enableRunInBackground: true
Git Bash 自动发现顺序:%ProgramFiles%\Git\usr\bin\bash.exe → %ProgramFiles%\Git\bin\bash.exe → %LOCALAPPDATA%\Programs\Git\usr\bin\bash.exe → %ProgramFiles(x86)%\Git\...。找不到且未配置 bashPath 时,只在调用 winbash 时报错,挂载本身不失败。