fix: pod install with --project-directory (#35754)

Summary:
The variable `version` is previously used but in 234486068e (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: https://github.com/facebook/react-native/pull/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
This commit is contained in:
David Angulo 2022-12-31 02:42:55 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 4923a0997b
Коммит efd39eea6f
1 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@ -209,9 +209,6 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
flipper_post_install(installer)
end
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
version = package['version']
ReactNativePodsUtils.exclude_i386_architecture_while_using_hermes(installer)
ReactNativePodsUtils.fix_library_search_paths(installer)
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)