blob: afca095323bad5580274dc8abc61197918d9101a [file] [log] [blame]
Leopold29400282023-01-04 17:12:46 +01001#!/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.
4set -euo pipefail
5
6if [[ -z "${BAZEL_REAL:-}" ]]; then
7 echo "BAZEL_REAL is not set - do not run directly, instead, use bazelisk" >&2
8 exit 1
9fi
10
11if [[ -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
16fi
17
18exec scripts/bin/bazel "$@"