Skip to content

Commit

Permalink
Fix use of name parameter to pkg_tar (bazelbuild#469)
Browse files Browse the repository at this point in the history
The legacy branch of pkg_tar attempts to fetch the name parameter using kwargs. As name is an explicit parameter, this results in a build error. The PR changes this branch to use 'name' instead.
  • Loading branch information
kwc authored Nov 10, 2021
1 parent 9187f10 commit d54885c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def pkg_tar(name, **kwargs):
if "srcs" not in kwargs:
if "files" in kwargs:
if not hasattr(kwargs["files"], "items"):
label = "%s//%s:%s" % (native.repository_name(), native.package_name(), kwargs["name"])
label = "%s//%s:%s" % (native.repository_name(), native.package_name(), name)

# buildifier: disable=print
print("%s: you provided a non dictionary to the pkg_tar `files` attribute. " % (label,) +
Expand Down

0 comments on commit d54885c

Please sign in to comment.