From ea03b4846300bec3744631f635bfc6c0ea5f78f0 Mon Sep 17 00:00:00 2001 From: KeiSei84 <2206745@gmail.com> Date: Fri, 22 May 2026 14:14:55 +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=20(#36)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PATH-wiring (~/.claude/bin, home of the `kei` entry-point) was gated on `[ -t 0 ] && [ -t 1 ]`; curl|bash tees stdout so -t 1 is false → pathway skipped → `kei: command not found`. Same tee/-t1 trap as onboarding (this one in the top-level install.sh). Eradicated across tree: install.sh, lib-menu.sh, lib-wizard.sh all gate on [ -t 0 ]. Verified piped-under-pty. 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