fix(install): show progress during npm install in non-interactive mode#76355
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-24 02:19 UTC / May 23, 2026, 10:19 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
PR Surface View PR surface stats
Summary Reproducibility: yes. Source inspection shows piped or otherwise non-interactive installs disable gum and the no-gum npm branch redirects output without a progress line; the PR body also supplies before/after terminal output for that path. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Merge the one-line installer progress fix after normal installer validation, letting #82305 close when this PR lands. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows piped or otherwise non-interactive installs disable gum and the no-gum npm branch redirects output without a progress line; the PR body also supplies before/after terminal output for that path. Is this the best way to solve the issue? Yes. Adding the same progress text immediately before the silent fallback command is the narrowest maintainable fix and leaves npm execution, retries, logging, and the gum spinner branch unchanged. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 069c7b87eb67. |
9c7064d to
7042da6
Compare
60ce8b9 to
868e8fd
Compare
868e8fd to
577d82e
Compare
577d82e to
baed7e1
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Moonlit Shellbean Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
When running via curl | bash, gum is disabled and run_npm_global_install silently redirects all output to a temp log file. Users see no feedback during the npm install step which can take 60+ seconds. Add ui_info before the silent npm command to match the spinner text shown in the gum branch. Closes openclaw#82305 Signed-off-by: Sebastien Tardif <[email protected]>
baed7e1 to
03192ae
Compare
|
Heads up: this PR needs to be updated against current |
steipete
left a comment
There was a problem hiding this comment.
Reviewed the one-line installer fallback change against current origin/main; no blocking findings.
Verification:
git pull --ff-onlygh pr diff 76355 --repo openclaw/openclaw --patchbash -n scripts/install.shOPENCLAW_INSTALL_SH_NO_RUN=1 ... run_npm_global_installwith a fakenpmon PATH: printedInstalling OpenClaw package, returnedrc=0, and wrote the fake npm output to the log.git merge-tree --write-tree origin/main HEAD: clean merge tree8e4b28e76e02c3d80e084d1020910af08b8f128a; compared withorigin/main, final merge result isscripts/install.sh | 1 +.gh pr view 76355 --json statusCheckRollup: no non-green relevant checks; CI and Website Installer Sync checks are green or intentionally skipped.
Proof gap: I did not run a real global npm install locally; the contributor supplied non-interactive Linux install proof, and local proof verified this exact fallback emits the progress line without exercising global package mutation.
Problem
When running
curl -fsSL https://openclaw.ai/install.sh | bash, gum is disabled because stdin is a pipe (is_non_interactive_shellreturns true). Without gum,run_npm_global_installsilently redirects all output to a temp log file (line 751):Users see no feedback during the npm install step, which can take 60+ seconds. The gum branch already shows "Installing OpenClaw package" via
run_with_spinner, but the no-gum fallback is completely silent.Fix
Add
ui_info "Installing OpenClaw package"before the silent npm command in the no-gum branch, matching the pattern from PR #71720 that was applied torun_quiet_step.Closes #82305
Real behavior proof
Behavior addressed: in non-interactive mode (piped stdin, no gum), the npm install step now shows a progress message instead of running silently for 60+ seconds.
Real environment tested: Linux x86_64, OpenClaw 2026.5.12 already installed, Node v26.0.0, npm 11.12.1. Ran
bash scripts/install.sh --install-method npm < /dev/nullto simulatecurl | bashnon-interactive mode.Exact steps or command run after this patch: (1) checked out upstream/main install.sh, ran
bash scripts/install.sh --install-method npm < /dev/null 2>&1and captured output; (2) applied the one-line fix, ran the same command again and captured output; (3) compared the install section output.Evidence after fix: terminal output copied below.
Before (upstream/main, no progress line):
After (with
ui_infoadded):Full install section before:
Full install section after:
Observed result after fix: the "Installing OpenClaw package" progress line now appears between the version announcement and the completion checkmark, matching the text shown by the gum spinner branch in interactive mode. No other output changed.
What was not tested: gum/spinner interactive path (gum is only available when stdin is a tty, which this non-interactive proof intentionally disables). The gum branch already shows this text via
run_with_spinnerand is unchanged by this PR.