Skip to content

Commit fe62c52

Browse files
committed
Warn if we cannot find a bazel executable but do not fail start script
1 parent fa85e47 commit fe62c52

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

start

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,16 @@ check_files_dont_exist () {
119119
done
120120
}
121121

122+
have () {
123+
command -v "$1" > /dev/null 2>&1
124+
}
125+
122126
check_bazel_version () {
127+
if ! have bazel; then
128+
# shellcheck disable=SC2016
129+
stderr 'Warning: cannot find `bazel` executable in $PATH'
130+
return
131+
fi
123132
actual_raw=$(bazel version | grep -E '^Build label:' | grep -Eo '[0-9.]+')
124133

125134
# shellcheck disable=SC2034

0 commit comments

Comments
 (0)