Skip to content

Commit b29be75

Browse files
committed
Don't set downloaded_file_path for file = None
If the file is None then that means we shouldn't pass this to the http_file call, most likely this entries also have a None sha256 sum
1 parent 6faf27f commit b29be75

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

private/extensions/download_pinned_deps.bzl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ def download_pinned_deps(mctx, artifacts, http_files, has_m2local):
3434
seen_repo_names.append(http_file_repository_name)
3535
http_files.append(http_file_repository_name)
3636

37-
http_file(
38-
name = http_file_repository_name,
39-
sha256 = artifact["sha256"],
40-
urls = urls,
37+
attrs = {
38+
"name": http_file_repository_name,
39+
"sha256": artifact["sha256"],
40+
"urls": urls,
41+
}
42+
43+
if artifact["file"] and artifact["file"] != "None":
4144
# https://github.com/bazelbuild/rules_jvm_external/issues/1028
42-
downloaded_file_path = "v1/%s" % artifact["file"] if artifact["file"] else artifact["file"],
43-
)
45+
attrs["downloaded_file_path"] = "v1/%s" % artifact["file"]
46+
47+
http_file(**attrs)
4448

4549
return seen_repo_names

0 commit comments

Comments
 (0)