-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
1 parent
ed929df
commit 835f62c
Showing
2 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters