Fix: fix osx cp warning.#2103
Merged
penberg merged 1 commit intotursodatabase:mainfrom Jun 26, 2025
Merged
Conversation
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.
PThorpe92
approved these changes
Jun 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macos, cp's
--no-preserveoption 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:This changeset makes sure the option is only passed in non
macostarget_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