diff --git a/pkg/private/pkg_files.bzl b/pkg/private/pkg_files.bzl index 6fc0971c..d09ab79d 100644 --- a/pkg/private/pkg_files.bzl +++ b/pkg/private/pkg_files.bzl @@ -74,7 +74,6 @@ _MappingContext = provider( "allow_duplicates_with_different_content": "bool: don't fail when you double mapped files", "include_runfiles": "bool: include runfiles", "strip_prefix": "strip_prefix", - "path_mapper": "function to map destination paths", # Defaults @@ -94,8 +93,7 @@ def create_mapping_context_from_ctx( strip_prefix = None, include_runfiles = None, default_mode = None, - path_mapper = None - ): + path_mapper = None): """Construct a MappingContext. Args: See the provider definition. @@ -396,7 +394,8 @@ def add_from_default_info( all_files = src[DefaultInfo].files.to_list() for f in all_files: d_path = mapping_context.path_mapper( - dest_path(f, data_path, data_path_without_prefix)) + dest_path(f, data_path, data_path_without_prefix), + ) if f.is_directory: add_tree_artifact( mapping_context.content_map, @@ -436,7 +435,7 @@ def add_from_default_info( _check_dest(mapping_context.content_map, d_path, rf, src.label, mapping_context.allow_duplicates_with_different_content) mapping_context.content_map[d_path] = _DestFile( src = rf, - entry_type = ENTRY_IS_FILE, + entry_type = ENTRY_IS_DIR if rf.is_directory else ENTRY_IS_FILE, origin = src.label, mode = fmode, user = mapping_context.default_user,