bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Support checking bazelisk version without downloading bazel

Open TheButlah opened this issue 4 years ago • 0 comments

I am using bazelisk instead of bazel, and have a shell script that gets sourced from the rc file to check if bazelisk matches the expected version, and if not, download an updated bazelisk.

To do this, I parse the output of bazel version, looking for the version of bazelisk (not bazel). However, running bazel version when bazel has not yet been installed (or a newer version exists), causes bazelisk to download the newer bazel version. This is a problem in my case because I don't want to download bazel until the user actually wants to call bazel, since the rc file script should not interrupt their shell and make them wait for a download to complete.

It would be great if there was a way to detect the version of bazelisk without requiring bazel to download.

TheButlah avatar Jun 17 '20 16:06 TheButlah