dsh-gitbash-shell 0.43.1 → 0.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/tool-runner.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
> 倒序排列,新版本条目在最上面。条目格式:`## vX.Y.Z — YYYY-MM-DD` + 类型(feat / fix / docs / chore)+ 要点 + 相关链接。
|
|
4
4
|
> 纪律见 AGENTS.md「变更记录纪律」:发版前先更新本文件并随版本提交;事故复盘、复现与真机验证记录也记在这里。
|
|
5
5
|
|
|
6
|
+
## [0.43.2] — 2026-10-23
|
|
7
|
+
|
|
8
|
+
### fix:被我们杀掉的 run 统一归 `code=-1`(Windows `taskkill /F` 退出码语义)
|
|
9
|
+
|
|
10
|
+
- **0.43.1 的 CI(windows-latest)仍红,这次咬到的是生产代码**:`taskkill /F` 强杀的进程在
|
|
11
|
+
Windows 上 exit code 是 **1**(POSIX 是 signal → null → 我们的 `-1`)。超时/取消/看门狗三种
|
|
12
|
+
被击杀结局在 win 上会报告 `code=1`——读起来像 winget 失败,实际是被我们杀掉的,verdict 也
|
|
13
|
+
因此可能被外部观察者误读(verdictFrom 本身只信标志,不受影响)。
|
|
14
|
+
- **修法**:`defaultRunnerIo` 的 `close` 处理里,任一击杀标志(cancelled / timedOut /
|
|
15
|
+
networkRetry)命中时 `code` 统一归 `-1`——被我们杀掉的 run 没有「自然退出码」,跨平台语义
|
|
16
|
+
一致。自然退出(包括失败)的 code 透传不变。
|
|
17
|
+
- 教训:win32 分支的**杀进程退出码**语义 macOS 不可见——本仓库第三次被同一类问题咬
|
|
18
|
+
(v0.39.4 ns 字面量 → v0.43.0/1 pathname 双盘符 → 本次 taskkill 退出码);CI windows 矩阵
|
|
19
|
+
是唯一能看到它们的场合,发版纪律「CI 全绿才收口」的价值再次实证。
|
|
20
|
+
- 全量 334 项本机 0 fail;以 CI(ubuntu+windows × Node 22/24)全绿为收口门。
|
|
21
|
+
|
|
6
22
|
## [0.43.1] — 2026-10-23
|
|
7
23
|
|
|
8
24
|
### fix:测试装置的 Windows 路径 bug(v0.43.0 的 CI 修复,无功能变化)
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "Windows 全模式 Git Bash:自带 bash 工具(私有 Git Bash 执行器实例,官方 PowerShell 执行器原样保留),官方四个模式经行内工具补位直接获得 Git Bash(v0.35.0 起;v0.39.0 起不再替换宿主执行器),四个 *·Git Bash 变体 preset 可开关;官方 pwsh 工具默认隐藏、开关可见(真 PowerShell);附带 gb_* FastCtx 文件工具,检测到 dsh-ops 自动让位。联动:dsh-ptc-cordis-preset(PTC 创造模式带 Git Bash 行且可去重)+ dsh-better-sidebar(终端标签自动切 Git Bash)。",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.2",
|
|
4
4
|
"description": "Windows 上给 agent 一个真正的 Git Bash 命令工具:私有 Git Bash 执行器实例(官方 PowerShell 执行器原样保留),统一 MSYS 盘根路径方言,官方 pwsh 工具默认隐藏可开关,物化四个内置预设的 Git Bash 变体,侧栏终端接管可开关。· Give agents a real Git Bash tool on Windows: a private Git Bash executor instance (the official PowerShell executor stays untouched), a unified MSYS drive-root path dialect, an opt-in official pwsh tool, and four Git Bash preset variants.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/tool-runner.js
CHANGED
|
@@ -165,8 +165,13 @@ export function defaultRunnerIo(options = {}) {
|
|
|
165
165
|
clearTimeout(timer)
|
|
166
166
|
if (retryTimer !== null) { clearTimeout(retryTimer); retryTimer = null }
|
|
167
167
|
if (current !== null && current.child === child) current = null
|
|
168
|
+
// A run WE killed has no meaningful exit code. POSIX reports null
|
|
169
|
+
// (→ -1 below), but Windows' taskkill /F makes the victim exit 1 —
|
|
170
|
+
// which would read as a winget failure instead of the kill it was,
|
|
171
|
+
// so any flagged ending normalizes to -1.
|
|
172
|
+
const killed = flags.cancelled === true || flags.timedOut === true || flags.networkRetry === true
|
|
168
173
|
resolve({
|
|
169
|
-
code: typeof code === 'number' ? code : -1,
|
|
174
|
+
code: typeof code === 'number' && !killed ? code : -1,
|
|
170
175
|
output,
|
|
171
176
|
...(flags.cancelled === true ? { cancelled: true } : {}),
|
|
172
177
|
...(flags.timedOut === true ? { timedOut: true } : {}),
|