Skip to content

Commit c527864

Browse files
committed
ignore copy target dir to handle cargo package
1 parent de5be72 commit c527864

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

devtools-frontend/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ fn copy_devtools_dir(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result
5555
if entry.file_name().to_str() == Some("node_modules") {
5656
continue;
5757
}
58+
// In `cargo package`, each crate source files are copied to
59+
// target/package/crate-<version> & threre are target dir
60+
if entry.file_name().to_str() == Some("target") {
61+
continue;
62+
}
5863
copy_devtools_dir(entry.path(), dst.as_ref().join(entry.file_name()))?;
5964
} else {
6065
fs::copy(entry.path(), dst.as_ref().join(entry.file_name()))?;

0 commit comments

Comments
 (0)