Skip to content

Commit 20ca146

Browse files
authored
fix(apple): improved Node finder (#2267)
1 parent e266fbf commit 20ca146

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ios/node.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ def find_node
55
# If `pod install` is run inside a "virtual" environment like
66
# [Yarn](https://yarnpkg.com/), we might find Node wrappers instead of the
77
# actual binary.
8-
paths = `type --all --path node`.split("\n")
9-
i = paths.find_index { |bin| `file #{bin}`.include? 'Mach-O' }
10-
raise 'Could not find Node' if i.nil?
11-
12-
paths[i]
8+
`node --print "process.argv[0]"`.strip
139
end
1410

1511
def nearest_node_modules(project_root)

0 commit comments

Comments
 (0)