Skip to content

Commit efd39ee

Browse files
dcangulofacebook-github-bot
authored andcommitted
fix: pod install with --project-directory (#35754)
Summary: The variable `version` is previously used but in 2344860#diff-adcf572f001c2b710d14f409c14763f1a50b08369b3034548f1602685d21f67f, its usage have been removed the but the variable is kept. It also raises an error when using `bundle exec pod install --project-directory=ios` which works on `0.70.X` and below. ```txt No such file or directory @ rb_sysopen - ../node_modules/react-native/package.json /Users/davidangulo/Desktop/mobile/myapp/node_modules/react-native/scripts/react_native_pods.rb:212:in `read' /Users/davidangulo/Desktop/mobile/myapp/node_modules/react-native/scripts/react_native_pods.rb:212:in `react_native_post_install' ``` ## Changelog [IOS] [FIXED] - pod install with --project-directory Pull Request resolved: #35754 Test Plan: `bundle exec pod install --project-directory=ios` should not raise an error. Reviewed By: christophpurrer Differential Revision: D42298517 Pulled By: rshest fbshipit-source-id: bef0b03312d2029188ae5437e3baf3ffce5cb73f
1 parent 4923a09 commit efd39ee

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

scripts/react_native_pods.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,6 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
209209
flipper_post_install(installer)
210210
end
211211

212-
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
213-
version = package['version']
214-
215212
ReactNativePodsUtils.exclude_i386_architecture_while_using_hermes(installer)
216213
ReactNativePodsUtils.fix_library_search_paths(installer)
217214
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)

0 commit comments

Comments
 (0)