fix(chruby): update brew sourcing for Apple Silicon (#12941)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
Dennis Dashkevich 2025-02-12 22:24:56 +03:00 committed by GitHub
parent 4d9d346718
commit 8074eb8b46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,8 @@ _source-from-homebrew() {
# check default brew prefix
if [[ -h /usr/local/opt/chruby ]];then
_brew_prefix="/usr/local/opt/chruby"
elif [[ -h /opt/homebrew/opt/chruby ]]; then
_brew_prefix="/opt/homebrew/opt/chruby"
else
# ok , it is not default prefix
# this call to brew is expensive ( about 400 ms ), so at least let's make it only once