Skip to content

Commit 2986154

Browse files
chrfalchclaude
andcommitted
fix(ios-prebuild): platform-conditional cp flags in the deps headers sidecar
Same macOS-only clonefile flag as headers-compose; keeps the prebuild scripts runnable under Linux CI jest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 21265a4 commit 2986154

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/react-native/scripts/ios-prebuild/headers-xcframework.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ const {execSync} = require('child_process');
2929
const fs = require('fs');
3030
const path = require('path');
3131

32+
// APFS clonefile (-c) is a macOS-only cp flag; plain -R elsewhere (Linux CI
33+
// exercises these paths through the jest integration tests).
34+
const CP_FLAGS = process.platform === 'darwin' ? '-Rc' : '-R';
35+
3236
/*::
3337
export type StubSlice = {
3438
name: string, // human label
@@ -222,7 +226,7 @@ function buildDepsHeadersXcframework(
222226
try {
223227
for (const ns of namespaces) {
224228
execSync(
225-
`/bin/cp -Rc "${path.join(depsHeaders, ns)}" "${path.join(stage, ns)}"`,
229+
`/bin/cp ${CP_FLAGS} "${path.join(depsHeaders, ns)}" "${path.join(stage, ns)}"`,
226230
);
227231
}
228232
outXcfw = composeHeadersOnlyXcframework(

0 commit comments

Comments
 (0)