diff options
| author | Max Howell | 2012-08-28 09:52:13 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-29 12:41:36 -0400 |
| commit | 0ac3e83a7abbf0fe06206d4da145f2cd724b2a87 (patch) | |
| tree | ea6c515f717b7f10fe659402f69d472581af88a5 /bin | |
| parent | 0efd1b9efefe107f637784c90643d512bd060c2c (diff) | |
| download | brew-0ac3e83a7abbf0fe06206d4da145f2cd724b2a87.tar.bz2 | |
Make `brew --prefix` very fast
Because people use this in .bash_profile etc. We should be as fast as possible.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/brew | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,11 @@ std_trap = trap("INT") { exit! 130 } # no backtrace thanks HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__) +if ARGV == %w{--prefix} + puts File.dirname(File.dirname(HOMEBREW_BREW_FILE)) + exit 0 +end + require 'pathname' HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.dirname.parent.join("Library/Homebrew").to_s $:.unshift(HOMEBREW_LIBRARY_PATH + '/vendor') |
