From 4c570b5d31ef46e04e5fa26fa92d7f7090bf15e2 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Mon, 11 Aug 2025 06:36:15 -0700 Subject: [PATCH] fix cp command in ReactNativeDependencies.podspec (#53136) Summary: When running `RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 pod install` I'm getting an error: `cp: framework/packages/react-native/..: File exists` This is not seen consistently by everyone but I've seen in reported one more time at Expo. Could be related to running MacOS 26. Somehow, apparently, the `..` is being treated as a literal directory name and cp is trying to create a directory named `..` inside `framework/packages/react-native/` which is not what we want. Using `/.` avoids that. --- What also seemed to work(around) was to change `mkdir -p framework/packages/react-native` to `mkdir -p framework/packages/` and then `cp` can create the `framework/packages/react-native/..` folder. But this is definitely more confusing. ## Changelog: Pick one each for the category and type tags: [IOS] [FIXED] - fix "file exists" error in `ReactNativeDependencies.podspec` Pull Request resolved: https://github.com/facebook/react-native/pull/53136 Test Plan: tested locally, and in CI on older macOS: https://github.com/expo/expo/pull/38631 (the ios build succeeds) Reviewed By: rshest Differential Revision: D79990895 Pulled By: cipolleschi fbshipit-source-id: 44ff9034800d3acd4e55ec39aabfb326382372cb --- .../third-party-podspecs/ReactNativeDependencies.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec b/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec index 32ebe58e05f..c10c2a2f622 100644 --- a/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec +++ b/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec @@ -64,7 +64,7 @@ Pod::Spec.new do |spec| cp -R "$HEADERS_PATH/" Headers mkdir -p framework/packages/react-native - cp -R "$XCFRAMEWORK_PATH/.." framework/packages/react-native/ + cp -R "$XCFRAMEWORK_PATH/../." framework/packages/react-native/ find "$XCFRAMEWORK_PATH/.." -type f -exec rm {} + find "$CURRENT_PATH" -type d -empty -delete CMD