Skip to content

Commit cfdbabc

Browse files
committed
The default Homebrew prefix is /opt/homebrew on darwin-aarch64
1 parent be96ee5 commit cfdbabc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/truffle/truffle/openssl-prefix.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ module Truffle
2020
end
2121
}
2222

23-
macOS = RUBY_PLATFORM.include?('darwin')
24-
25-
if macOS && !ENV['OPENSSL_PREFIX']
26-
if prefix = search_homebrew.call('/usr/local')
23+
if Truffle::Platform.darwin? && !ENV['OPENSSL_PREFIX']
24+
default_homebrew_prefix = Truffle::System.host_cpu == 'aarch64' ? '/opt/homebrew' : '/usr/local'
25+
if prefix = search_homebrew.call(default_homebrew_prefix)
2726
# found
2827
else
2928
homebrew = `brew --prefix 2>/dev/null`.strip

0 commit comments

Comments
 (0)