diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 659134ccb5c..72a8bd185a6 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -18,7 +18,8 @@ if [ -d "$INIT_DIR" ] && [ "$(ls -A "$INIT_DIR" 2>/dev/null)" ]; then [ -f "$script" ] || continue if [ -x "$script" ]; then echo "[openclaw-init] Running $(basename "$script")..." - "$script" 2>&1 | sed "s/^/ /" + output=$("$script" 2>&1) || echo "[openclaw-init] WARNING: $(basename "$script") exited with status $?" + [ -n "$output" ] && printf '%s\n' "$output" | sed 's/^/ /' else echo "[openclaw-init] Skipping $(basename "$script") (not executable)" fi