File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -461,9 +461,6 @@ def copy_to_directory_bin_action(
461461 })
462462 file_inputs .append (f .file )
463463
464- if not file_inputs :
465- fail ("No files to copy" )
466-
467464 config = {
468465 "allow_overwrites" : allow_overwrites ,
469466 "dst" : dst .path ,
Original file line number Diff line number Diff line change @@ -449,3 +449,22 @@ diff_test(
449449 file1 = "case_21" ,
450450 file2 = ":expected_21" ,
451451)
452+
453+ # Case 22: empty sources creates an empty directory output
454+ copy_to_directory (
455+ name = "case_22" ,
456+ srcs = [],
457+ )
458+
459+ copy_to_directory (
460+ name = "expected_22" ,
461+ srcs = ["dir_expected_22" ],
462+ exclude_srcs_patterns = ["**/filter_me_out" ],
463+ )
464+
465+ diff_test (
466+ name = "case_22_test" ,
467+ file1 = "case_22" ,
468+ file2 = ":expected_22" ,
469+ tags = ["local" ], # seems that the Bazel sandbox has trouble with empty directories
470+ )
You can’t perform that action at this time.
0 commit comments