Skip to content

Cherry-pick 7bbfb9de5: fix(update): fallback to --omit=optional when global npm update fails#1352

Merged
alexey-pelykh merged 2 commits intomainfrom
cherry-pick/7bbfb9de5-update-omit-optional
Mar 14, 2026
Merged

Cherry-pick 7bbfb9de5: fix(update): fallback to --omit=optional when global npm update fails#1352
alexey-pelykh merged 2 commits intomainfrom
cherry-pick/7bbfb9de5-update-omit-optional

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick from upstream

Upstream commit: 7bbfb9de5
Author: Xinhua Gu
Tier: PICK (needs rebrand)
Issue: #668

Summary

  • Adds --omit=optional retry when npm i -g fails during CLI self-update (e.g. @discordjs/opus native build failure)
  • Adds globalInstallFallbackArgs() to update-global.ts
  • Adds inferUpdateFailureHints() for user-facing EACCES and native-dep failure messages
  • New test coverage for fallback retry and hint inference

Adaptation

  • Conflict in src/infra/update-runner.ts: fork uses inline progress callbacks instead of upstream's runStep helper. Resolved by inlining the fallback step execution with the fork's progress callback pattern.
  • Rebranded openclawremoteclaw in hint messages (progress.ts), test fixtures (progress.test.ts, update-runner.test.ts)

🤖 Generated with Claude Code

xinhuagu and others added 2 commits March 14, 2026 22:58
…openclaw#24896)

* fix(update): fallback to --omit=optional when global npm update fails

* fix(update): add recovery hints and fallback for npm global update failures

* chore(update): align fallback progress step index ordering

* chore(update): label omit-optional retry step in progress output

* chore(update): avoid showing 1/2 when fallback path is not used

* chore(ci): retrigger after unrelated test OOM

* fix(update): scope recovery hints to npm failures

* test(update): cover non-npm hint suppression

---------

Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 7bbfb9d)
The fork's DEFAULT_PACKAGE_CHANNEL is "next" (not "stable"), so
the npm tag resolves to @next instead of @latest. Update test mock
command strings and fixture data to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-pelykh alexey-pelykh merged commit b9ec14a into main Mar 14, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/7bbfb9de5-update-omit-optional branch March 14, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants