diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl index 308891af3..1294d6278 100644 --- a/go/private/sdk.bzl +++ b/go/private/sdk.bzl @@ -441,7 +441,10 @@ def _remote_sdk(ctx, urls, strip_prefix, sha256): # in Bazel 6.0.0+ (bazelbuild/bazel#16052). The only situation where # .zip files are needed seems to be a macOS host using a Windows toolchain # for remote execution. - if urls[0].endswith(".tar.gz"): + if (urls[0].endswith(".tar.gz") and + # Development versions of Bazel have an empty version string. We assume that they are + # more recent than the version that introduced the fix. + not versions.is_at_least("6.4.0", versions.get() or "6.4.0")): if strip_prefix != "go": fail("strip_prefix not supported") ctx.download(