Skip to content

Commit 9537636

Browse files
committed
avoid installing another bazel version on version mismatch
1 parent 25af30a commit 9537636

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/s-core-devcontainer/.devcontainer/s-core-local/install_matching_bazel_version.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22
set -eo pipefail
33

4-
if [ -f .bazelversion ] && [ "$(cat .bazelversion)" != "$(bazel version | grep 'Build label:' | awk '{print $3}')" ]; then
4+
. /etc/profile.d/bazel.sh || true
5+
6+
if [ -f .bazelversion ] && [ "$(cat .bazelversion)" != "$USE_BAZEL_VERSION" ]; then
57
# Pre-install the matching Bazel version, setup the bash command completion
68
USE_BAZEL_VERSION=$(cat .bazelversion)
79
bazel help completion > /tmp/bazel-complete.bash

0 commit comments

Comments
 (0)