From 23182298b5077d522a793022e1f2615dbbbb68ec Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Mon, 6 Oct 2025 07:51:25 -0700 Subject: [PATCH] fixed cp command to work with gnu coreutils (#54063) Summary: When using gnu coreutils, installation of ReactNativeDependenices on iOS fails at compile time with errors like in the following issue (in the Expo repo): https://github.com/expo/expo/issues/38992 This is caused by a missing `.` in the end of the path name that the built-in MacOS cp command handles well, but that will create an extra Headers folder when using cp from gnu coreutils. This commit fixes this by adding the missing `.` ## Changelog: [IOS] [FIXED] - Fixed issue when using gnu coreutils cp command when using precompiled binaries causing compilation error Pull Request resolved: https://github.com/facebook/react-native/pull/54063 Test Plan: - Verify that you're running gnu coreutils (`cp --version`) - Create new expo app `npx create-expo-app` - Build on iOS - should error without this fix, should work with the fix. Reviewed By: christophpurrer Differential Revision: D83964083 Pulled By: javache fbshipit-source-id: 46dc074ca9b7fc97fa5a37ef48d68a895e3310ff --- .../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 c10c2a2f622..e08e6c2b099 100644 --- a/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec +++ b/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec @@ -62,7 +62,7 @@ Pod::Spec.new do |spec| exit 0 fi - cp -R "$HEADERS_PATH/" Headers + cp -R "$HEADERS_PATH/." Headers mkdir -p framework/packages/react-native cp -R "$XCFRAMEWORK_PATH/../." framework/packages/react-native/ find "$XCFRAMEWORK_PATH/.." -type f -exec rm {} +