Skip to content

Commit

Permalink
Do not refuse to copy symlinks in build script (#236)
Browse files Browse the repository at this point in the history
Refusing to copy symlinks
breaks the build under <https://github.com/nix-community/naersk>.
  • Loading branch information
link2xt authored Mar 5, 2024
1 parent d77ecaa commit 599f484
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,9 @@ fn cp_r(src: &Path, dst: &Path) {
if ty.is_dir() {
fs::create_dir_all(&dst).unwrap();
cp_r(&path, &dst);
} else if ty.is_symlink() {
} else if ty.is_symlink() && path.iter().any(|p| p == "cloudflare-quiche") {
// not needed to build
if path.iter().any(|p| p == "cloudflare-quiche") {
continue;
}
panic!("can't copy symlink {path:?}");
continue;
} else {
let _ = fs::remove_file(&dst);
if let Err(e) = fs::copy(&path, &dst) {
Expand Down

0 comments on commit 599f484

Please sign in to comment.