blob: dede0789840ff3368802f333d85145b9a9b0a533 [file] [log] [blame] [edit]
#!/bin/bash
fail_on_output() {
tee /dev/stderr | not read
}
# not makes sure the command passed to it does not exit with a return code of 0.
not() {
# This is required instead of the earlier (! $COMMAND) because subshells and
# pipefail don't work the same on Darwin as in Linux.
! "$@"
}
die() {
echo "$@" >&2
exit 1
}