Skip to content

Fix: fix osx cp warning.#2103

Merged
penberg merged 1 commit intotursodatabase:mainfrom
o0Ignition0o:fix/osx_cp_warning
Jun 26, 2025
Merged

Fix: fix osx cp warning.#2103
penberg merged 1 commit intotursodatabase:mainfrom
o0Ignition0o:fix/osx_cp_warning

Conversation

@o0Ignition0o
Copy link
Copy Markdown
Contributor

On macos, cp's --no-preserve option does not exist. It is enabled by default, and can be disabled with the explicit -p (preserve) flag. This lead libsql-ffi's build.rs to warn about an illegal option used:

  cp: illegal option -- -
  usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file target_file
         cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file ... target_directory

This changeset makes sure the option is only passed in non macos target_os.

It seems like the build.rs file has had quite a lot of bugfixes over time, especially the CP function, so feel free to dismiss this PR if you're not comfortable landing it, as it's just a warning, and if the cp command does not work it will fallback to copy_dir_all.

I'm also lacking context on this library so if I'm missing anything please let me know!

Thanks

On macos, cp's `--no-preserve` option does not exist. It is enabled by default, and can be disabled with the explicit `-p` (preserve) flag.
This lead libsql-ffi's build.rs to warn about an illegal option used:

```
  cp: illegal option -- -
  usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file target_file
         cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file ... target_directory
```

This changeset makes sure the option is only passed in non `macos` target_os.
@penberg penberg added this pull request to the merge queue Jun 26, 2025
Merged via the queue into tursodatabase:main with commit eecb25d Jun 26, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants