From 2a33de7a10f87a68466c4933e39f15cc61feee71 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 1 Jan 2021 19:02:59 -0800 Subject: [PATCH] superenv: filter out /usr/local on ARM if necessary --- Library/Homebrew/shims/super/cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc index 30d249a0965ab..517c628a5d41a 100755 --- a/Library/Homebrew/shims/super/cc +++ b/Library/Homebrew/shims/super/cc @@ -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