#!/bin/bash

set -euo pipefail

# TODO: Consider running the setup script to ensure the correct version of
# bazel is installed. This is undesirable for local runs.
#./scripts/setup/setup.sh dev --no-ask-pass --tags bazel

set +e
"$@"
exit_status=$?
set -e

# Ignore failures due to not finding any tests to execute.
if [[ $exit_status == 4 ]]; then
  exit 0
fi

exit "$exit_status"
