Skip to content

Commit

Permalink
Merge pull request #112 from arkedge/ignore-target-dir-on-copy
Browse files Browse the repository at this point in the history
Ignore copy target dir to handle cargo package
  • Loading branch information
KOBA789 authored Mar 15, 2024
2 parents 2b47da1 + c527864 commit 87112c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devtools-frontend/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ fn copy_devtools_dir(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result
if entry.file_name().to_str() == Some("node_modules") {
continue;
}
// In `cargo package`, each crate source files are copied to
// target/package/crate-<version> & threre are target dir
if entry.file_name().to_str() == Some("target") {
continue;
}
copy_devtools_dir(entry.path(), dst.as_ref().join(entry.file_name()))?;
} else {
fs::copy(entry.path(), dst.as_ref().join(entry.file_name()))?;
Expand Down

0 comments on commit 87112c6

Please sign in to comment.