superenv: filter out /usr/local on ARM if necessary

This commit is contained in:
Misty De Meo 2021-01-01 19:02:59 -08:00
parent d820c9a919
commit 2a33de7a10
No known key found for this signature in database
GPG Key ID: 76CF846A2F674B2C

View File

@ -249,6 +249,11 @@ class Cmd
elsif path.start_with?("/opt/local", "/opt/boxen/homebrew", "/opt/X11", "/sw", "/usr/X11")
# ignore MacPorts, Boxen's Homebrew, X11, fink
false
elsif prefix != "/usr/local" && path.start_with?("/usr/local")
# ignore things in /usr/local if Homebrew is in another prefix;
# on macOS, this probably means that the user is on ARM and has an Intel
# Homebrew in /usr/local
false
elsif mac?
true
else