Skip to content

Commit 8a2a92c

Browse files
committed
update
1 parent a1c9e05 commit 8a2a92c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

bazelisk.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,13 @@ def download_bazel_into_directory(version, is_commit, directory):
315315
"The Bazel mirror does not have a checksum file; skipping checksum verification."
316316
)
317317
if "https://releases.bazel.build" not in bazel_url:
318-
(version, rc) = re.match(r"(\d*\.\d*(?:\.\d*)?)(rc\d+)?", version).groups()
319-
fallback_url="https://releases.bazel.build/{}/{}/{}".format(
320-
version, rc if rc else "release", bazel_filename
321-
)
322-
download(fallback_url, destination_path)
318+
matched=re.match(r"(\d*\.\d*(?:\.\d*)?)(rc\d+)?", version)
319+
if matched:
320+
(version, rc) = matched.groups()
321+
fallback_url="https://releases.bazel.build/{}/{}/{}".format(
322+
version, rc if rc else "release", bazel_filename
323+
)
324+
download(fallback_url, destination_path)
323325
return destination_path
324326
raise e
325327
with open(sha256_path, "r") as sha_file:

0 commit comments

Comments
 (0)