From ad1ddc241af723a3f5da2058709f9684e51fb5ce Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 13 Feb 2023 12:04:53 +0100 Subject: [PATCH] fix(ios): fix `pod install --project-directory=...` (#36096) --- scripts/react_native_pods.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 5198f805843175..88199595db674d 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -209,7 +209,8 @@ 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"))) + package_path = File.join(Pod::Config.instance.installation_root, react_native_path, "package.json") + package = JSON.parse(File.read(package_path)) version = package['version'] if ReactNativePodsUtils.has_pod(installer, 'hermes-engine') && is_building_hermes_from_source(version, react_native_path)