Skip to content

Commit

Permalink
Don't set downloaded_file_path for file = None
Browse files Browse the repository at this point in the history
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
  • Loading branch information
manuelnaranjo committed Mar 18, 2024
1 parent 6faf27f commit b29be75
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions private/extensions/download_pinned_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ def download_pinned_deps(mctx, artifacts, http_files, has_m2local):
seen_repo_names.append(http_file_repository_name)
http_files.append(http_file_repository_name)

http_file(
name = http_file_repository_name,
sha256 = artifact["sha256"],
urls = urls,
attrs = {
"name": http_file_repository_name,
"sha256": artifact["sha256"],
"urls": urls,
}

if artifact["file"] and artifact["file"] != "None":
# https://github.com/bazelbuild/rules_jvm_external/issues/1028
downloaded_file_path = "v1/%s" % artifact["file"] if artifact["file"] else artifact["file"],
)
attrs["downloaded_file_path"] = "v1/%s" % artifact["file"]

http_file(**attrs)

return seen_repo_names

0 comments on commit b29be75

Please sign in to comment.