Commit eecb25d
authored
Fix: fix osx cp warning. (tursodatabase#2103)
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!
Thanks1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
0 commit comments