blob: 6020cefc8a32528c4be569286776222590e66ced [file] [log] [blame]
#!/bin/bash
# This program hides all the output on stderr from the called command, unless it
# fails, in which case all the output is printed at the end.
set -e
set -u
readonly STDERR_FILE="$(mktemp)"
if ! "$@" 2>"${STDERR_FILE}" ; then
cat "${STDERR_FILE}"
exit 1
fi