openclaw/scripts/pr-lib/host-tools.sh
Peter Steinberger 1abf60d28c
fix(scripts): prevent host tooling drift from blocking PR workflows (#152078)
* fix(scripts): resolve pr tooling from a configurable root and preflight host git

* fix(scripts): preserve PR tooling contracts in dependency checks and fixtures

* test(scripts): match cross-checkout PR identity diagnostics

* fix(scripts): preserve GitHub CLI host selection for PR reads

* test(scripts): inject remote base drift at hosted verification
2026-09-18 14:34:18 -07:00

16 lines
431 B
Bash

# Standalone lock/recovery shells also use the wrapper's selected executable.
pr_git() { "${OPENCLAW_PR_GIT:-${GIT_EXEC:-git}}" "$@"; }
pr_run_bounded() (
set +e
set -m
"$@" &
local tool_pid=$! timer_pid result
(/bin/sleep 10; kill -KILL -- "-$tool_pid" 2>/dev/null) &
timer_pid=$!
wait "$tool_pid" 2>/dev/null
result=$?
kill -KILL -- "-$timer_pid" 2>/dev/null
wait "$timer_pid" 2>/dev/null
exit "$result"
)