# assert_command_exists
# ---------------------
# Verifica que un comando está disponible en el PATH.
# No produce output a stdout.
# Sale con exit code 1 si el comando no se encuentra.
#
# USO (sourced):
#   source assert_command_exists.sh
#   assert_command_exists docker

assert_command_exists() {
    local command_name="$1"

    if ! command -v "$command_name" &>/dev/null; then
        echo "assert_command_exists: comando no encontrado en PATH: $command_name" >&2
        return 1
    fi
}
