Skip to content

Commit 4f939cb

Browse files
rtg0795tf-text-github-robot
authored andcommitted
Fix bazel version scrapping logic for .bazelversion in install_bazel.sh
PiperOrigin-RevId: 509941465
1 parent 978fd9f commit 4f939cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oss_scripts/install_bazel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -x # print evaluated commands
55
# Read the bazel version from the path; slowly moving up parents
66
while [[ $PWD != / && -z $(find ~+/ -maxdepth 1 -type f -name .bazelversion) ]]
77
do cd ..; done
8-
BAZEL_VERSION=$(<.bazelversion)
8+
BAZEL_VERSION=$(head -n 1 .bazelversion)
99
if [[ -z "$BAZEL_VERSION" ]]; then exit 1; fi
1010

1111
# If (due to e.g., $PATH settings), bazel is actually running bazelisk,

0 commit comments

Comments
 (0)