From 551ea405f53c16cad6762238176e87ed37e7d58b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 7 Feb 2015 13:20:10 -0500 Subject: Don't prune cellar paths when cellar is in /opt Fixes #35382. --- Library/ENV/4.3/cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Library/ENV') diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 728559330..4ab9dc671 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -26,13 +26,14 @@ end LOGGER = Logger.new class Cmd - attr_reader :brewfix, :brewtmp, :sysroot + attr_reader :prefix, :cellar, :tmpdir, :sysroot def initialize path, args @arg0 = File.basename(path).freeze @args = args.freeze - @brewfix = ENV['HOMEBREW_PREFIX'] - @brewtmp = ENV['HOMEBREW_TEMP'] + @prefix = ENV['HOMEBREW_PREFIX'] + @cellar = ENV['HOMEBREW_CELLAR'] + @tmpdir = ENV['HOMEBREW_TEMP'] @sysroot = ENV['HOMEBREW_SDKROOT'] end @@ -199,7 +200,7 @@ class Cmd def keep? path case path - when %r{^#{Regexp.escape(brewfix)}}o, %r{^#{Regexp.escape(brewtmp)}}o + when %r{^#{Regexp.escape(prefix)}}o, %r{^#{Regexp.escape(cellar)}}o, %r{^#{Regexp.escape(tmpdir)}}o # maybe homebrew is installed to /sw or /opt/brew true when %r{^/opt}, %r{^/sw}, %r{/usr/X11} -- cgit v1.2.3