Repository navigation
v0.3.1
Bug fixes
- An MSYS- or WSL-form
workdirno longer fails as a missing shell. An absoluteworkdirwas handed tospawnas the child'scwdunchanged:node:pathcalls both MSYS/d/WorkSpaceand the WSL automount view/mnt/d/WorkSpaceabsolute, but Windows resolves them against the current drive (G:\d\WorkSpace), so the spawn failed and reported ENOENT against the executable —bash.exe/wsl.exe— which reads as a missing shell rather than an unusable directory. Both forms are now translated to the nativeD:\WorkSpacebefore the executor sees them. Only a single-letter first segment (optionally under/mnt/) whose drive exists qualifies, so MSYS POSIX roots (/etc,/usr,/tmp,/dev) and distro-side paths such as/mnt/datakeep their own meaning, and a relativeworkdirstill resolves against the session workspace.toNativeWorkdiris exported for the audit.
Improvements
- Tool descriptions track the dsh 0.2.0 skeleton.
tool-bashandtool-pwsheach gained two sentences upstream;git_bash/wsl_bashnow carry the bash-family wording — verify the resolved absolute target path before any delete or move, and guard a computed path against an unset variable with${VAR:?}. They deliberately do not adopt pwsh's$HOMEsentence: in bash$HOMEis an ordinary assignable variable. - The exit-status prompt section now states the gating rule. Alongside the
[exit code: N]instruction, each tool row tells the model to chain dependent steps with&&orset -o pipefail, because;never stops on failure andcmd | tailreturnstail's status rather than the command's. It stays in the prompt rather than the per-call schema (cross-call guidance), and the runtime's own tail truncation is the reason not to bound output with a pipe. The text lives in the exportedSHELL_EXIT_STATUS_SECTIONso the audit can pin it.
Verification
Verified on dsh 0.2.0-rc.2; the peer floors stay at >=0.1.7-rc.2, which that release satisfies, so 0.1.7 deployments are unaffected.
npm test(smoke/run.ps1):git_bash,wsl_bashand the base bundle's ownpwshseat each executed a real command (git-bash-ok/wsl-ok/pwsh-ok) withshellSeatPresent: true, in both the schema-default and pinned-bashPathvariants.smoke/audit.ps1: 140 assertions, 0 failures. Nine of them are the new regression guards, and they do fail on the previous code: six unit assertions over the drive-form translation plus three boot assertions that run a real command through an MSYS-form and a WSL-automountworkdir.