Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions libsql-ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()>
/// propagate into OUT_DIR. If not present, when trying to rewrite a file, a `Permission denied`
/// error will occur.
fn copy_with_cp(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()> {
match Command::new("cp")
.arg("--no-preserve=mode,ownership")
let mut command = Command::new("cp");
// --no-preserve is enabled by default on macos
// preserve must be explicitly enabled with the -p flag
#[cfg(not(target_os = "macos"))]
let command = command.arg("--no-preserve=mode,ownership");
match command
.arg("-R")
.arg(from.as_ref().to_str().unwrap())
.arg(to.as_ref().to_str().unwrap())
Expand Down
Loading