From 7a2f6568b37393e7c6057ecaf5b751a8c80a4bc2 Mon Sep 17 00:00:00 2001 From: KeiSei84 <2206745@gmail.com> Date: Fri, 22 May 2026 14:12:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(install):=20wire=20PATH=20in=20curl|bash=20?= =?UTF-8?q?=E2=80=94=20gate=20pathway=20on=20stdin,=20not=20stdout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PATH-wiring step (~/.claude/bin, where the `kei` entry-point lives) was gated on `[ -t 0 ] && [ -t 1 ]`. curl|bash tees stdout to a logfile so -t 1 is false → pathway_install was skipped → `kei: command not found` after install. Same tee/-t1 trap as the onboarding gates (this one lived in the top-level install.sh, missed by the earlier variant grep which only scanned install/). Eradicated the pattern across the tree: install.sh pathway gate → [ -t 0 ] lib-menu.sh profile-menu gate → [ -t 0 ] lib-wizard.sh sleep-wizard gate → [ -t 0 ] Verified piped-under-pty with /dev/tty reattach: .zshrc gets the kei-substrate block (~/.claude/bin on PATH); non-interactive still skips. Co-Authored-By: Claude Opus 4.7 (1M context) --- install.sh | 6 +++++- install/lib-menu.sh | 3 +-- install/lib-wizard.sh | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 0250fd9..ad6c609 100755 --- a/install.sh +++ b/install.sh @@ -233,7 +233,11 @@ fi # target/release/ regardless of profile (lib-substrate.sh), so PATH wiring # is meaningful for every profile except minimal-without-prebuilt. if [ "$NO_PATHWAY" != "1" ]; then - if [ "$WITH_PATHWAY" = "1" ] || { [ -t 0 ] && [ -t 1 ]; }; then + # Gate on interactive stdin only — NOT -t 1: curl|bash tees stdout to a + # logfile, so -t 1 is false even interactively. Requiring it skipped PATH + # wiring (~/.claude/bin), so the `kei` entry-point was not found after a + # curl|bash install. (Same tee/-t1 trap as the onboarding gates.) + if [ "$WITH_PATHWAY" = "1" ] || [ -t 0 ]; then pathway_install fi fi diff --git a/install/lib-menu.sh b/install/lib-menu.sh index 3f2b18c..c6a0259 100644 --- a/install/lib-menu.sh +++ b/install/lib-menu.sh @@ -17,8 +17,7 @@ menu_should_skip() { [ -n "$ADD_LIST" ] && return 0 [ -n "$REMOVE_NAME" ] && return 0 [ "$LIST_MODE" = "1" ] && return 0 - [ ! -t 0 ] && return 0 - [ ! -t 1 ] && return 0 + [ ! -t 0 ] && return 0 # interactive stdin only; not -t 1 (curl|bash tees stdout) return 1 } diff --git a/install/lib-wizard.sh b/install/lib-wizard.sh index 5b475ee..f43716b 100644 --- a/install/lib-wizard.sh +++ b/install/lib-wizard.sh @@ -10,7 +10,7 @@ run_sleep_wizard() { local sleep_helper="$AGENTS_DIR/_primitives/kei-sleep-setup.sh" - if [[ -x "$sleep_helper" ]] && [ -t 0 ] && [ -t 1 ]; then + if [[ -x "$sleep_helper" ]] && [ -t 0 ]; then # stdin only; not -t 1 (curl|bash tees stdout) say "running sleep-sync setup helper" "$sleep_helper" || warn "sleep-sync setup did not complete — re-run via /sleep-setup" else