fix: fix a bug where copy_to_directory wouldn't copy hidden files inside
of folders
This commit is contained in:
parent
147a373568
commit
faba95385d
|
@ -146,7 +146,7 @@ if [[ -f "{src}" ]]; then
|
|||
cp -f "{src}" "{dst}"
|
||||
else
|
||||
mkdir -p "{dst}"
|
||||
cp -fR "{src}"/* "{dst}"
|
||||
cp -fR "{src}/." "{dst}"
|
||||
fi
|
||||
""".format(src = src_path, dst_dir = skylib_paths.dirname(dst_path), dst = dst_path))
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ load("//lib:directory_path.bzl", "make_directory_paths")
|
|||
"expected_7",
|
||||
"expected_8",
|
||||
"expected_9",
|
||||
"expected_10",
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -232,3 +233,20 @@ diff_test(
|
|||
file1 = "case_8",
|
||||
file2 = ":expected_8",
|
||||
)
|
||||
|
||||
# Case 10: copy folder containing hidden file
|
||||
copy_to_directory(
|
||||
name = "case_10",
|
||||
srcs = [
|
||||
":dir_g",
|
||||
],
|
||||
replace_prefixes = {
|
||||
"dir_g": "",
|
||||
},
|
||||
)
|
||||
|
||||
diff_test(
|
||||
name = "case_10_test",
|
||||
file1 = "case_10",
|
||||
file2 = ":expected_10",
|
||||
)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
foobar
|
|
@ -0,0 +1 @@
|
|||
foobar
|
Loading…
Reference in New Issue