fix(install): wire PATH in curl|bash — gate pathway on stdin, not stdout (#36)
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) <noreply@anthropic.com>
This commit is contained in:
parent
1bde36548e
commit
ea03b48463
3 changed files with 7 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue