test(docker): make e2e temp logs portable

This commit is contained in:
Peter Steinberger
2026-04-23 08:52:48 +01:00
parent e204a31831
commit af03832134
3 changed files with 5 additions and 3 deletions

View File

@@ -4,7 +4,9 @@ run_logged() {
local label="$1"
shift
local log_file
log_file="$(mktemp "${TMPDIR:-/tmp}/openclaw-${label}.XXXXXX").log"
local tmp_dir="${TMPDIR:-/tmp}"
tmp_dir="${tmp_dir%/}"
log_file="$(mktemp "$tmp_dir/openclaw-${label}.XXXXXX")"
if ! "$@" >"$log_file" 2>&1; then
cat "$log_file"
rm -f "$log_file"