Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing BAZELISK_FORMAT_URL does not trigger re-downloading Bazel #488

Open
kjteske opened this issue Aug 11, 2023 · 0 comments
Open

Changing BAZELISK_FORMAT_URL does not trigger re-downloading Bazel #488

kjteske opened this issue Aug 11, 2023 · 0 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) type:bug Something isn't working

Comments

@kjteske
Copy link

kjteske commented Aug 11, 2023

Using bazelisk v1.17.0, changing BAZELISK_FORMAT_URL does not trigger re-downloading Bazel if the same version number of Bazel has previously been downloaded from anywhere.

# Start off clean
rm -f .bazelversion
rm -f .bazeliskrc
rm -rf ~/.cache/bazelisk/downloads/bazelbuild

# Download official/upstream Bazel 6.3.1
USE_BAZEL_VERSION=6.3.1 bazelisk --version
# Outputs:
#   2023/08/11 10:05:46 Downloading https://releases.bazel.build/6.3.1/release/bazel-6.3.1-linux-x86_64...
#   bazel 6.3.1

# Switch to our internally-built and published URL
cat > .bazeliskrc <<EOL
BAZELISK_FORMAT_URL=<our internal URL>
USE_BAZEL_VERSION=6.3.1
EOL
bazelisk --version
# Outputs:
#   bazel 6.3.1
# We expect this to download from our internal URL, but it does not

Workaround: we can use BAZELISK_BASE_URL, but then we have to conform to the usual URL format.

Changing BAZELISK_BASE_URL properly re-downloads - the code here changes the download directory if BaseURLEnv is set, but not if FormatURLEnv is set.

@fweikert fweikert added type:bug Something isn't working P2 We'll consider working on this in future. (Assignee optional) labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants