fix(@scripts): 🐛 add path probing for python3 SDK detection

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-05-17 05:10:18 -07:00
parent 31659cf20b
commit 795e40c69a

View file

@ -187,11 +187,17 @@ list_triage_on() {
_helper="$_helper_dir/_claude-triage"
[ -f "$_helper" ] || return 0
if is_local "$_host"; then
# Probe PATH with Homebrew prefixes (mac) and the user's ~/.local/bin
# both included, in case the script is invoked from a leaner non-login
# context (ssh, cron, tmux without env inheritance).
_orig_path=$PATH
PATH=$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:$PATH
PY=""
for _p in python3.13 python3.12 python3.11 python3; do
_b=$(command -v "$_p" 2>/dev/null) || continue
"$_b" -c "import claude_code_batch_sdk" 2>/dev/null && PY=$_b && break
done
PATH=$_orig_path
if [ -z "$PY" ]; then
echo "rclaude: no python with claude_code_batch_sdk found locally" >&2
return 1