fix #1048
diff --git a/pkg/private/tar/tar.bzl b/pkg/private/tar/tar.bzl index 7562f7c..78cfebb 100644 --- a/pkg/private/tar/tar.bzl +++ b/pkg/private/tar/tar.bzl
@@ -113,7 +113,7 @@ "--owner_names", "%s=%s" % (_quote(key), ctx.attr.ownernames[key]), ) - if ctx.attr.compression_level: + if ctx.attr.compression_level >= 0: args.add("--compression_level", str(ctx.attr.compression_level)) # Now we begin processing the files. @@ -139,8 +139,7 @@ for target, f_dest_path in ctx.attr.files.items(): target_files = target[DefaultInfo].files.to_list() if len(target_files) != 1: - fail("Each input must describe exactly one file.", attr = "files") - mapping_context.file_deps_direct.append(target_files[0]) + fail("Each input must describe exactly one file.", attr = "files") mapping_context.file_deps_direct.append(target_files[0]) add_single_file( mapping_context, f_dest_path,