[bug] update: exits 0 after the upgrade actually failed
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 72/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
- 領域
- cli
研究方向
從會輸出「Automatic update failed」的 bl update 失敗路徑開始;issue 未指定來源檔案或測試。追蹤該分支如何處理 npm 失敗和程序結束狀態,接著執行相關的更新測試,或使用唯讀的 npm 全域前綴重現問題。完成條件是升級失敗時回傳非零狀態,而升級成功時仍維持成功。
由索引模型根據 Issue 內容生成。
描述
Environment
- CLI: bl 2.0.1 at the time of failure (Skill: 2.0.1)
- Node: v22.23.3
- OS: Linux 5.15.0-198-generic x86_64 (Ubuntu)
- Install channel: npm global (
npm prefix -g→/home/lin/.npm-global) - Region: cn (domestic)
Reproduce
- Install
blglobally via npm. - Make the npm global prefix read-only (here: a read-only filesystem sandbox).
- With a newer version available (2.0.1 → 2.1.0), run:
bl update; echo "exit=$?"
Expected
A failed upgrade exits non-zero.
Actual
The upgrade failed with EROFS, the CLI printed Automatic update failed. Please run manually: — and still exited 0.
Any driver that checks only the exit code (CI, cron, agent) will record the
upgrade as successful while the old version is still installed. In this case the
caller believed 2.0.1 was the latest until it re-read bl --version.
Full output
Current version: 2.0.1
Install method: npm
Checking for updates...
Latest version: 2.1.0
Updating bailian-cli via npm...
npm error code EROFS
npm error syscall rename
npm error path /home/lin/.npm-global/lib/node_modules/bailian-cli
npm error dest /home/lin/.npm-global/lib/node_modules/.bailian-cli-RC0fMVNr
npm error errno -30
npm error rofs EROFS: read-only file system, rename '/home/lin/.npm-global/lib/node_modules/bailian-cli' -> '/home/lin/.npm-global/lib/node_modules/.bailian-cli-RC0fMVNr'
npm error rofs Often virtualized file systems, or other file systems
npm error rofs that don't support symlinks, give this error.
npm error A complete log of this run can be found in: <npm debug log>
Automatic update failed. Please run manually:
npm install -g bailian-cli@latest
exit=0
Already tried
- Confirmed the exit code with both
echo $?and${PIPESTATUS[0]}— both 0 - The failure is not shell-related:
bl updateitself returns 0 - Same behaviour regardless of whether npm's cache/logs directories are writable
- After granting write access, the retry succeeded (2.0.1 → 2.1.0) and printed
the skill-update result normally — so only the failure branch reports success
Notes
- Frequency: always on the failure path
- Related: #229 reports
--config <profile>also exiting 0 on failure
(exits 0 unauthenticated). Same class of defect: the process exit code does
not reflect the outcome, and the CLI's own documented contract treats exit 0 as
SUCCESS. - Suggested fix: propagate npm's exit code from the
bl updatefailure branch
(or return a dedicated non-zero code), sobl update && ...and agent drivers
can detect the failure.
- 主要語言
- TypeScript
- 星號
- 527
- 分支
- 33
- 平均合併
- 6 小時 11 分鐘
- 30 天內合併 PR
- 26
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
modelstudioai/cli 的其他 Issue
-
[bug]: speech recognize --timeout 未作用于临时 OSS 上传(固定 120 秒)可能已有人在做 @hopelynd 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
modelstudioai/cli#243 ·
維護者通常 1 天內回覆
-
[bug] vision describe: default base URL is the Coding Plan endpoint → HTTP 404 for all VL/OCR models未關閉
難度 2/5 1-3 小時 新手友好度 78/100
modelstudioai/cli#241 · 1 則留言 ·
維護者通常 1 天內回覆
-
[bug] bl update: darwin-arm64 binary ships invalid ad-hoc signature, killed by macOS (Killed: 9)未關閉
難度 2/5 1-3 小時 新手友好度 65/100
modelstudioai/cli#223 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 35/100
modelstudioai/cli#240 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 57/100
modelstudioai/cli#239 ·
維護者通常 1 天內回覆
查看 modelstudioai/cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
openwatersio/slackwater-database#281 ·
維護者通常 1 天內回覆
-
accepted bug via-triage
難度 2/5 1-3 小時 新手友好度 76/100
pingdotgg/t3code#18690 · 1 則留言 ·
維護者通常 1 天內回覆
-
Bayern feature:Application ready web
難度 2/5 1-3 小時 新手友好度 67/100
digitalfabrik/entitlementcard#3176 ·
維護者通常 7 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
NanmiCoder/cc-haha#1533 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆