fix(@scripts/session-tools): 🐛 handle pipe stdin in remote triage command
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
0f823b4ecd
commit
34daed5aca
1 changed files with 6 additions and 3 deletions
|
|
@ -553,7 +553,11 @@ list_triage_on() {
|
|||
echo "rclaude: no python with claude_code_batch_sdk found locally" >&2
|
||||
return 1
|
||||
fi
|
||||
"$PY" "$_helper" "$@" 2>/dev/null || true
|
||||
# Detach stdin: the SDK spawns claude CLI subprocesses that inherit
|
||||
# stdin from our caller. If we're invoked inside `scan_hosts | while
|
||||
# read`, those subprocesses eat the pipe and the loop dies after the
|
||||
# first host. </dev/null isolates us.
|
||||
"$PY" "$_helper" "$@" </dev/null 2>/dev/null || true
|
||||
else
|
||||
_args=""
|
||||
for a in "$@"; do
|
||||
|
|
@ -563,8 +567,7 @@ list_triage_on() {
|
|||
# pre-installed on the remote.
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=5 "$_host" \
|
||||
"${_REMOTE_TRIAGE_BOOT} \$PY -${_args}" \
|
||||
< "$_helper" 2>>/tmp/rclaude-debug.log \
|
||||
| tee -a "/tmp/rclaude-debug-stdout-${_host}.log" || true
|
||||
< "$_helper" 2>/dev/null || true
|
||||
fi | awk -F'\t' -v host="$_host" '
|
||||
# _claude-triage writes informational lines starting with "# " to
|
||||
# stderr; the stdout we capture is pure TSV. Each row:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue