#!/bin/bash
# Fake sudo for the tests: drop -n and run the command.
# SUDO_FAIL=1 simulates a command the sudoers rule doesn't allow.
if [ -n "$SUDO_FAIL" ]; then echo "sudo: a password is required" >&2; exit 1; fi
[ "$1" = "-n" ] && shift
exec "$@"
