From 0a38066843e7bc98c07455bd0f7bdd3cc816e71a Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:10:07 +0200 Subject: [PATCH] fix(apple): improved Node finder --- ios/node.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ios/node.rb b/ios/node.rb index 7815b6060..abc9245bc 100644 --- a/ios/node.rb +++ b/ios/node.rb @@ -5,11 +5,7 @@ def find_node # If `pod install` is run inside a "virtual" environment like # [Yarn](https://yarnpkg.com/), we might find Node wrappers instead of the # actual binary. - paths = `type --all --path node`.split("\n") - i = paths.find_index { |bin| `file #{bin}`.include? 'Mach-O' } - raise 'Could not find Node' if i.nil? - - paths[i] + `node --print "process.argv[0]"`.strip end def nearest_node_modules(project_root)