#!/usr/bin/env bash
# Stub podman for the deploy-handler seam: `image exists` succeeds only for
# $STUB_IMAGE (empty = nothing in storage); every other verb is a no-op.
# The invocations are logged so a test can read what the handler executed.
printf '%s\n' "$*" >> "${STUB_PODMAN_LOG:-/dev/null}"
case "$1 $2" in
    "image exists")
        [[ -n "${STUB_IMAGE:-}" && "$3" == "$STUB_IMAGE" ]] || exit 1
        ;;
esac
exit 0
