Repository navigation
fix(install): piped install-cli.sh --onboard fails after a successful install - #201430
vincentkoc merged 3 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR gives installer-launched onboarding terminal input, keeps interactive output separate from JSON events, and visibly defers setup without a terminal. Example: Run curl -fsSL https://openclaw.ai/install-cli.sh | bash -s -- --onboard from a terminal.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR fixes a current first-run installer defect, with sufficient real-install evidence and no actionable code findings; exact-head CI awaits workflow approval. Priority: P0 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe standalone CLI installer provisions OpenClaw into a local prefix, then hands control to the existing onboarding command; terminal input and installer JSON events require separate streams. flowchart TD
A[Piped installer invocation] --> B[Provision Node and OpenClaw]
B --> C[Resolve controlling terminal]
C --> D[Interactive onboarding]
C --> E[Visible deferred setup command]
B --> F[Installer NDJSON events]
Technical reviewBest possible solution: Land the focused installer handoff after approved exact-head workflows pass, retaining the existing wizard guard and visible headless setup command. Do we have a high-confidence way to reproduce the issue? The inherited-pipe call on current main directly contradicts onboarding's TTY requirement, and the contributor supplies a real base failure; this read-only review executed no target code. Is this the best way to solve the issue? The patch repairs the installer-owned stream handoff using the established sibling approach; each added test group protects a distinct input, headless, or output-stream failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 346078f73f19. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +119, Other +46. Total +165 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 21, 2026, 4:56 AM ET / 09:56 UTC (Revision 2). |
… install The documented curl | bash form leaves the curl pipe as stdin, so the final openclaw onboard step inherits it, refuses to start via its interactive TTY guard, and the installer exits 1 after the install already succeeded. Run onboarding with stdin from the controlling terminal device (the same handoff install.sh uses), keep its interactive output off the JSON event stream, and when no terminal exists defer onboarding with a visible setup command while keeping exit status 0. Fixes openclaw#201388
a0f9a14 to
245241f
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
… install (#201430) * fix(install): piped install-cli.sh --onboard fails after a successful install The documented curl | bash form leaves the curl pipe as stdin, so the final openclaw onboard step inherits it, refuses to start via its interactive TTY guard, and the installer exits 1 after the install already succeeded. Run onboarding with stdin from the controlling terminal device (the same handoff install.sh uses), keep its interactive output off the JSON event stream, and when no terminal exists defer onboarding with a visible setup command while keeping exit status 0. Fixes #201388 * fix(install): keep onboarding interactive when output is redirected * fix(install): open the onboarding terminal once Co-authored-by: LiuwqGit <[email protected]> Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 6ea3594)
… install (#201430) * fix(install): piped install-cli.sh --onboard fails after a successful install The documented curl | bash form leaves the curl pipe as stdin, so the final openclaw onboard step inherits it, refuses to start via its interactive TTY guard, and the installer exits 1 after the install already succeeded. Run onboarding with stdin from the controlling terminal device (the same handoff install.sh uses), keep its interactive output off the JSON event stream, and when no terminal exists defer onboarding with a visible setup command while keeping exit status 0. Fixes #201388 * fix(install): keep onboarding interactive when output is redirected * fix(install): open the onboarding terminal once Co-authored-by: LiuwqGit <[email protected]> Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 6ea3594) Co-authored-by: RomneyDa <[email protected]>
… install (openclaw#201430) * fix(install): piped install-cli.sh --onboard fails after a successful install The documented curl | bash form leaves the curl pipe as stdin, so the final openclaw onboard step inherits it, refuses to start via its interactive TTY guard, and the installer exits 1 after the install already succeeded. Run onboarding with stdin from the controlling terminal device (the same handoff install.sh uses), keep its interactive output off the JSON event stream, and when no terminal exists defer onboarding with a visible setup command while keeping exit status 0. Fixes openclaw#201388 * fix(install): keep onboarding interactive when output is redirected * fix(install): open the onboarding terminal once Co-authored-by: LiuwqGit <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Closes #201388
What Problem This Solves
curl -fsSL https://openclaw.ai/install-cli.sh | bash -s -- --onboardone-liner get a completed install followed by exit code 1: the finalopenclaw onboardstep inherits the curl pipe as stdin, onboarding's interactive TTY guard refuses to start, andset -euo pipefailturns the already-successful install into a failure.install.sh(labels: P0, impact:ux-release-blocker, clawsweeper:queueable-fix).fd3e1dc0b16), and this change composes with both — the no-terminal hint uses the sameprintf %qquoting as the fix: show how to run openclaw when install-cli.sh leaves it off PATH #202312 hint, and the onboarding skip event rides the same NDJSON fd as fix(install): keep install-cli.sh --json stdout limited to NDJSON events #202385.Why This Change Was Made
--onboardin the piped form runs onboarding reading from the user's terminal, the same handoffinstall.shalready uses; with--jsonthe event stream on stdout stays parseable as independent NDJSON records; with no terminal available the installer defers onboarding with a visible setup command and keeps exit status 0.install.shis unchanged.main()inscripts/install-cli.sh.has_controlling_tty/controlling_tty_pathhelpers are copied from the merged sibling installer (scripts/install.sh, including the macOS [Bug]: OpenClaw macOS onboarding crashes when detached npm inherits /dev/tty #200244 note), and regression tests pin the piped, no-terminal, and--jsonpaths.User Impact
curl … | bash -s -- --onboardnow drops the user into onboarding after the install and exits 0; headless runs getNo terminal available; run …/bin/openclaw onboard to finish setup.on stderr plus anonboardingskip NDJSON event, and still exit 0.scripts/install-cli.sh(terminal handoff at the end ofmain()) andtest/scripts/install-cli.test.ts("runs onboarding with stdin from the controlling terminal, not the installer pipe", "defers onboarding without a terminal and keeps exit status and JSON output clean", "keeps onboarding output out of the JSON event stream when a terminal exists").Evidence
The maintainer correction preserves interactive stdin/stdout even in a session without a controlling terminal. When install output is redirected, the wizard receives both descriptors from the terminal. Its prompts stay out of redirected logs and JSON output. Linux CI passed the real-PTY cases for redirected output, JSON, and inherited descriptors, plus the no-terminal deferral. The final terminal handoff opens the terminal once for reading and writing. The installer workflow passed, including ShellCheck on the assembled script. The PTY tests use a CLI fixture that enforces the wizard’s terminal requirement. The packaged-wizard run below is the contributor’s earlier Linux proof.
245241f3194(on mainfd3e1dc0b16). Real end-to-end product runs — no installer function stubbed: the standalone distribution script (install-cli.shwithinstall-policy.shinlined, the exact artifact shapeopenclaw.ai/install-cli.shserves) was fed to bash through a pipe (cat install-cli.sh | bash -s -- …), run inside a real PTY (util-linuxscript,stty cols 120 rows 36) and undersetsidwithout a controlling terminal. Node 24.22.1 was downloaded from nodejs.org (sha256 verified) and the realopenclawnpm package was installed from the registry over the network, in isolatedHOME/prefix directories.--jsonstdout parses line-by-line as independent NDJSON records in every path; a latest-stable upgrade preserves existing settings byte-for-byte.run-baseblock above is a full real-network reproduction against current mainfd3e1dc0b16(which already includes fix: show how to run openclaw when install-cli.sh leaves it off PATH #202312/fix(install): keep install-cli.sh --json stdout limited to NDJSON events #202385): install completes, the finalopenclaw onboardstep inherits the curl pipe, the wizard refuses to start, and the installer exits 1./dev/pts/*comes from Linuxps -o tty=) was exercised on Linux only.