aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLibrary/ENV/4.3/cc9
-rw-r--r--Library/Homebrew/extend/ENV/super.rb1
2 files changed, 6 insertions, 4 deletions
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}
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index a23fd7d4e..0af84f6e2 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -45,6 +45,7 @@ module Superenv
self['HOMEBREW_OPTIMIZATION_LEVEL'] = 'Os'
self['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE.to_s
self['HOMEBREW_PREFIX'] = HOMEBREW_PREFIX.to_s
+ self['HOMEBREW_CELLAR'] = HOMEBREW_CELLAR.to_s
self['HOMEBREW_TEMP'] = HOMEBREW_TEMP.to_s
self['HOMEBREW_SDKROOT'] = effective_sysroot
self['HOMEBREW_OPTFLAGS'] = determine_optflags