Skip to content

Commit

Permalink
fix: always include files from the same workspace as the build target…
Browse files Browse the repository at this point in the history
… in `copy_to_directory`

Fixes bazel-contrib#359.

This updates the `copy_to_directory` tool to accept a workspace name representing the workspace of the target it is executing under. Any files in this workspace are automatically included, regardless of the `include_external_repositories` option. This makes it support usage within an external target (such as `@wksp//:dir`).
  • Loading branch information
dgp1130 committed Jul 30, 2023
1 parent fa1f19f commit cdb9641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/copy_to_directory.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ def copy_to_directory_bin_action(
inputs = file_inputs + [config_file],
outputs = [dst],
executable = copy_to_directory_bin,
arguments = [config_file.path],
arguments = [config_file.path, ctx.label.workspace_name],
mnemonic = "CopyToDirectory",
progress_message = "Copying files to directory %s" % _progress_path(dst),
execution_requirements = _COPY_EXECUTION_REQUIREMENTS,
Expand Down

0 comments on commit cdb9641

Please sign in to comment.