Leopold | 2940028 | 2023-01-04 17:12:46 +0100 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | # Both bazelisk and bazel's native wrapper scripts will attempt to use the well-known executable |
| 3 | # named "tools/bazel" to run Bazel. The path of the original executable is stored in BAZEL_REAL. |
| 4 | set -euo pipefail |
| 5 | |
| 6 | if [[ -z "${BAZEL_REAL:-}" ]]; then |
| 7 | echo "BAZEL_REAL is not set - do not run directly, instead, use bazelisk" >&2 |
| 8 | exit 1 |
| 9 | fi |
| 10 | |
| 11 | if [[ -z "${BAZELISK_SKIP_WRAPPER:-}" ]]; then |
| 12 | echo "#########################################################" >&2 |
| 13 | echo " You are not using Bazelisk. This is not recommended." >&2 |
| 14 | echo " Make sure you are using the correct version of Bazel." >&2 |
| 15 | echo "#########################################################" >&2 |
| 16 | fi |
| 17 | |
| 18 | exec scripts/bin/bazel "$@" |