File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ fn copy_with_cp(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()>
62
62
Ok ( ( ) )
63
63
}
64
64
65
- #[ cfg( not ( target_os = "windows" ) ) ]
65
+ #[ cfg( target_os = "linux" ) ]
66
66
fn copy_with_cp ( src : impl AsRef < Path > , dst : impl AsRef < Path > ) -> io:: Result < ( ) > {
67
67
let status = Command :: new ( "cp" )
68
68
. arg ( "--no-preserve=mode,ownership" )
@@ -81,6 +81,24 @@ fn copy_with_cp(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()>
81
81
}
82
82
}
83
83
84
+ #[ cfg( target_os = "macos" ) ]
85
+ fn copy_with_cp ( src : impl AsRef < Path > , dst : impl AsRef < Path > ) -> io:: Result < ( ) > {
86
+ let status = Command :: new ( "cp" )
87
+ . arg ( "-R" )
88
+ . arg ( src. as_ref ( ) . to_str ( ) . unwrap ( ) )
89
+ . arg ( dst. as_ref ( ) . to_str ( ) . unwrap ( ) )
90
+ . status ( ) ?;
91
+
92
+ if !status. success ( ) {
93
+ Err ( io:: Error :: new (
94
+ io:: ErrorKind :: Other ,
95
+ "Failed to copy using cp" ,
96
+ ) )
97
+ } else {
98
+ Ok ( ( ) )
99
+ }
100
+ }
101
+
84
102
fn make_amalgamation ( ) {
85
103
let flags = [ "-DSQLITE_ENABLE_COLUMN_METADATA=1" ] ;
86
104
You can’t perform that action at this time.
0 commit comments