summaryrefslogtreecommitdiff
path: root/plugins/chruby
diff options
context:
space:
mode:
authorDennis Dashkevich <dskecse@gmail.com>2025-02-12 22:24:56 +0300
committerGitHub <noreply@github.com>2025-02-12 20:24:56 +0100
commit8074eb8b46d20a2f3ad2b99201388900a2e33450 (patch)
tree44ed4e1199826435f21979da233dcfafe9641d5f /plugins/chruby
parent4d9d346718caa6efdf6f350ed803e70d34fc6577 (diff)
downloadzsh-8074eb8b46d20a2f3ad2b99201388900a2e33450.tar.gz
zsh-8074eb8b46d20a2f3ad2b99201388900a2e33450.tar.bz2
zsh-8074eb8b46d20a2f3ad2b99201388900a2e33450.zip
fix(chruby): update brew sourcing for Apple Silicon (#12941)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Diffstat (limited to 'plugins/chruby')
-rw-r--r--plugins/chruby/chruby.plugin.zsh2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh
index 1210897c4..06afef189 100644
--- a/plugins/chruby/chruby.plugin.zsh
+++ b/plugins/chruby/chruby.plugin.zsh
@@ -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