Skip to content

Commit

Permalink
Fix go_download_sdk with Bazel dev versions (bazel-contrib#3580)
Browse files Browse the repository at this point in the history
The version check introduced in the previous commit did not take into
account that dev versions of Bazel report an empty version string.
  • Loading branch information
fmeum authored and jacqueline.lee committed Jul 19, 2023
1 parent 1286800 commit ee10888
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ def _remote_sdk(ctx, urls, strip_prefix, sha256):
ctx.delete("go_sdk.tar.gz")
elif (urls[0].endswith(".zip") and
host_goos != "windows" and
versions.is_at_least("6.0.0", versions.get())):
# Development versions of Bazel have an empty version string. We assume that they are
# more recent than the version that introduced rename_files.
versions.is_at_least("6.0.0", versions.get() or "6.0.0")):
ctx.download_and_extract(
url = urls,
stripPrefix = strip_prefix,
Expand Down

0 comments on commit ee10888

Please sign in to comment.