From f2d1b2601a5986c4058ad56270e66bffaeb2f9cc Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Mon, 13 Jul 2026 17:17:15 +0200 Subject: [PATCH] fix(tooling): tea-comment resolves tea from PATH or linuxbrew keg Agent shells often miss the brew shellenv (clide FR-1), so bare 'tea' 127s. The wrapper now falls back to /home/linuxbrew/.linuxbrew/bin/tea. Co-Authored-By: Claude Fable 5 --- tooling/tea-comment | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tooling/tea-comment b/tooling/tea-comment index 971496cfe..a63d13729 100755 --- a/tooling/tea-comment +++ b/tooling/tea-comment @@ -12,6 +12,15 @@ fi NUMBER="$1" INPUT="$2" +# Resolve tea: PATH first, then the known linuxbrew keg (agent shells often +# miss the brew shellenv — clide FR-1). +TEA="$(command -v tea || true)" +[[ -n "$TEA" ]] || TEA="/home/linuxbrew/.linuxbrew/bin/tea" +if [[ ! -x "$TEA" ]]; then + echo "Error: tea CLI not found (PATH or /home/linuxbrew/.linuxbrew/bin)" >&2 + exit 1 +fi + # If the body starts with @, read from file if [[ "$INPUT" == @* ]]; then FILEPATH="${INPUT#@}" @@ -29,4 +38,4 @@ TMPFILE="/tmp/tea-comment-${NUMBER}-${HASH}.md" trap 'rm -f "$TMPFILE"' EXIT printf '%s' "$BODY" > "$TMPFILE" -tea comment --login schweitz --repo jpmschweitzer/settled-reach "$NUMBER" "$(cat "$TMPFILE")" +"$TEA" comment --login schweitz --repo jpmschweitzer/settled-reach "$NUMBER" "$(cat "$TMPFILE")"