diff --git a/release-controller/release_notes.py b/release-controller/release_notes.py index 2e1a27863..65e0d4d05 100755 --- a/release-controller/release_notes.py +++ b/release-controller/release_notes.py @@ -491,8 +491,9 @@ def format_change(change: Change): def bazel_query(ic_repo: GitRepo, query): """Bazel query package for GuestOS.""" bazel_binary = "bazel" - if "BAZEL" in os.environ: - bazel_binary = os.path.abspath(os.curdir) + "/release-controller/bazelisk" + bazel_binary_local = os.path.abspath(os.curdir) + "/release-controller/bazelisk" + if os.path.exists(bazel_binary_local): + bazel_binary = bazel_binary_local bazel_query = [ bazel_binary,