Skip to content

Commit

Permalink
Deduplicate output_dirs for use in cp -r.
Browse files Browse the repository at this point in the history
  • Loading branch information
Monnoroch committed May 21, 2020
1 parent e0ded84 commit 849b1a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ def proto_compile_impl(ctx):
# Build copy command for directory outputs
# Use cp {}/. rather than {}/* to allow for empty output directories from a plugin (e.g when no service exists,
# so no files generated)
# TODO: make output_dirs a depset properly.
command_parts = ["cp -r {} '{}'".format(
" ".join(["'" + d.path + "/.'" for d in output_dirs]),
" ".join(["'" + d.path + "/.'" for d in depset(output_dirs).to_list()]),
new_dir.path,
)]

Expand Down

0 comments on commit 849b1a6

Please sign in to comment.