Cherry-pick 7bbfb9de5: fix(update): fallback to --omit=optional when global npm update fails#1352
Merged
alexey-pelykh merged 2 commits intomainfrom Mar 14, 2026
Merged
Conversation
…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]>
This was referenced Mar 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick from upstream
Upstream commit:
7bbfb9de5Author: Xinhua Gu
Tier: PICK (needs rebrand)
Issue: #668
Summary
--omit=optionalretry whennpm i -gfails during CLI self-update (e.g.@discordjs/opusnative build failure)globalInstallFallbackArgs()toupdate-global.tsinferUpdateFailureHints()for user-facing EACCES and native-dep failure messagesAdaptation
src/infra/update-runner.ts: fork uses inline progress callbacks instead of upstream'srunStephelper. Resolved by inlining the fallback step execution with the fork's progress callback pattern.openclaw→remoteclawin hint messages (progress.ts), test fixtures (progress.test.ts,update-runner.test.ts)🤖 Generated with Claude Code