diff options
Diffstat (limited to 'scripts/debug-execution')
| -rwxr-xr-x | scripts/debug-execution | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/debug-execution b/scripts/debug-execution index eba5c0a..87540b7 100755 --- a/scripts/debug-execution +++ b/scripts/debug-execution @@ -6,6 +6,7 @@ set -euo pipefail DB="/site/doot.terst.org/data/claudomator.db" +DATA_DIR="/site/doot.terst.org/data" PREFIX="${1:?Usage: $0 <execution-id-or-prefix>}" if [[ ! -f "$DB" ]]; then @@ -52,14 +53,17 @@ if [[ -n "$TASK_ROW" ]]; then echo " Working dir: ${WORKING_DIR:-(not set)}" fi +# Resolve log paths: use DB value if set, otherwise derive from known convention. +EXEC_LOG_DIR="${DATA_DIR}/executions/${EXEC_ID}" +: "${STDOUT_PATH:=${EXEC_LOG_DIR}/stdout.log}" +: "${STDERR_PATH:=${EXEC_LOG_DIR}/stderr.log}" + # Logs print_log() { local label="$1" path="$2" echo "" echo "=== $label ===" - if [[ -z "$path" ]]; then - echo " (path not recorded)" - elif [[ ! -f "$path" ]]; then + if [[ ! -f "$path" ]]; then echo " (file not found: $path)" elif [[ ! -s "$path" ]]; then echo " (empty)" |
