Repository navigation
fix(install): stop when the Homebrew bootstrap fails instead of reporting success - #187688
Merged
Merged
Conversation
…ting success Preserve the bootstrap exit status through quiet execution and the npm/git Node preparation paths. Explicitly return before Homebrew success when Bash errexit is suppressed by conditional ensure_node calls. Fixes #187678. Regression from #187635. Thanks @McgAtom for the report and reproduction.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 29, 2026 13:35
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 30, 2026
…ting success (openclaw#187688) After openclaw#187635 moved runtime admission, ensure_node is called from a conditional, which disables bash's implicit failure handling inside install_homebrew. A failed Homebrew bootstrap therefore printed 'Homebrew installed' and went on to brew install node. The installer now propagates the bootstrap status explicitly through quiet and verbose modes and both installer entry paths, so it stops with the original exit status before any success output or Node provisioning. Fixes openclaw#187678. Thanks @McgAtom for the report.
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.
What Problem This Solves
Fixes #187678: macOS installs that need Homebrew report “Homebrew installed” and attempt Node provisioning after the Homebrew bootstrap fails. Regression introduced by #187635. Thanks @McgAtom for the report and isolated reproduction.
User Impact
Failed Homebrew bootstraps now stop immediately with their original exit status and diagnostic in both quiet and verbose modes, before any dependent Node install or misleading success message. Successful bootstraps still proceed normally. The selected-checkout Node engine behavior from #187635 is preserved.
Why This Change Was Made
The extracted
ensure_noderuns in an||list, which disables Bash's impliciterrexitin nested calls. Explicitly propagate the bootstrap failure frominstall_homebrew, retain it through both npm and git entry paths, and letrun_quiet_stepreturn the command's original status instead of reducing ordinary failures to 1.Audited the sibling Node paths touched by #187635: Homebrew Node installation explicitly stops on failure; nvm has explicit failure checks; Linux required provisioning steps explicitly terminate. PowerShell package-manager callbacks check native exit codes and validate the resulting runtime;
Ensure-Nodepropagates failure. No additional fall-through repair was needed there.The change removes quiet-mode status normalization and adds no new configuration or compatibility paths. Production: +5/-11 lines (net -6); regression tests: +86 lines; docs: +2 lines. The tests cover the failure at installer
mainand successful-bootstrap controls through refusing package adapters.Evidence
/bin/bash3.2.57, assembled standalone installer sourced withOPENCLAW_INSTALL_SH_NO_RUN=1, realmain,ensure_node,install_homebrew,run_quiet_step, andinstall_node. Isolated HOME/state/temp directories; network/bootstrap and package effects refused by adapters. This proves installer-main control flow, not a complete package installation or the bottom-level argument dispatcher.82777f305ef8cf01d462998707291dd777f2f8a3: all four npm/git × quiet/verbose bootstrap-failure cases exit 1, print Homebrew success, and attempt the refused Node install. Four successful-bootstrap controls pass. Green with the fix: all eight cases pass; bootstrap exit 17 retains its diagnostic, prints no success, and never invokes brew. Successful-bootstrap controls reach refusedbrew install node, stop before linking, and print no Node success.node scripts/run-vitest.mjs test/scripts/install-sh.provisioning.test.ts --maxWorkers=1: 8 passed; 0.922 s Vitest duration, 2.01 s wrapper wall time. CI seconds pending.pwshis unavailable; PowerShell audit is source evidence only.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.scripts.json --incremental, targeted oxlint, oxfmt,/bin/bash -n scripts/install.sh,git diff --check, and madge pass (0 cycles).check:changedSQLite inventory omitted under the campaign's local gate budget; PR CI provides broad proof.Inherited failures reproduced with the untouched base:
install-sh.test.ts→ “gives a working PATH remedy after a writable npm prefix with quoted prefix” and “prints a literal-safe direct PATH remedy for zsh”. Both reject the generated command with unmatched single-quote syntax errors. Their PATH-remedy code is unchanged by this PR. They remain recorded failures, not passing proof.