Skip to content

Commit

Permalink
fix: tar#srcs is optional (#785)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn authored Mar 8, 2024
1 parent 42b8255 commit d93c87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def tar(name, mtree = "auto", stamp = 0, **kwargs):
if mtree == "auto":
mtree_spec(
name = mtree_target,
srcs = kwargs["srcs"],
srcs = kwargs.get("srcs", []),
out = "{}.txt".format(mtree_target),
**propagate_common_rule_attributes(kwargs)
)
elif types.is_list(mtree):
expand_template(
name = mtree_target,
out = "{}.txt".format(mtree_target),
data = kwargs["srcs"],
data = kwargs.get("srcs", []),
# Ensure there's a trailing newline, as bsdtar will ignore a last line without one
template = ["#mtree", "{content}", ""],
substitutions = {
Expand Down

0 comments on commit d93c87f

Please sign in to comment.