Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix use_react_native to support absolute paths (#37545)
Summary: While setting up a monorepo that required a custom react-native path location (react-native-macos in my case) I was getting the following error when running `pod install` ![image](https://github.com/facebook/react-native/assets/11707729/29bacfbb-78d9-49db-9c75-3e75674d87e9) That's because `build_codegen` and `checkAndGenerateEmptyThirdPartyProvider` functions don't check if the given `react_native_path` is absolute or relative. This PR fixes this problem by checking if `react_native_path` starts with `/` bypass-github-export-checks ## Changelog: [IOS] [FIXED] - Fix `use_react_native` to support custom react native absolute paths Pull Request resolved: #37545 Test Plan: Modify [rn-tester/Podfile](https://github.com/facebook/react-native/tree/main/packages/rn-tester/Podfile) to use an absolute path when calling `use_react_native` E.g. ```rb rn_path = File.dirname(`node --print "require.resolve('react-native/package.json')"`) use_react_native!( path: rn_path, ... ) ``` then run `pod install` Reviewed By: cortinico Differential Revision: D46279570 Pulled By: cipolleschi fbshipit-source-id: 0d6da12c5617cfca2c9ef9dea08ecf728a970b6f
- Loading branch information