From 49d2009add5e6e27396d9d0bc3ec34fde4dc80c0 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 3 May 2023 16:01:27 +0100 Subject: [PATCH] Pass the file that needs to be read --- packages/react-native/scripts/cocoapods/jsengine.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/jsengine.rb b/packages/react-native/scripts/cocoapods/jsengine.rb index e8d93495488..625bd2702be 100644 --- a/packages/react-native/scripts/cocoapods/jsengine.rb +++ b/packages/react-native/scripts/cocoapods/jsengine.rb @@ -33,7 +33,8 @@ def setup_hermes!(react_native_path: "../node_modules/react-native", fabric_enab # This `:tag => hermestag` below is only to tell CocoaPods to update hermes-engine when React Native version changes. # We have custom logic to compute the source for hermes-engine. See sdks/hermes-engine/* hermestag_file = File.join(react_native_path, "sdks", ".hermesversion") - hermestag = File.exist?(hermestag_file) ? File.read().strip : '' + hermestag = File.exist?(hermestag_file) ? File.read(hermestag_file).strip : '' + pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes-engine/hermes-engine.podspec", :tag => hermestag pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes" pod 'libevent', '~> 2.1.12'