aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-08-11 12:34:39 -0400
committerMax Howell2012-08-12 11:40:55 -0400
commit33ec48a3946c78c392d71a2b631414710f8beb8b (patch)
tree7bdc7940b398f71702dcd8f63115ddf185e36d36 /Library
parent8818e008e360a6b6e94a1b470218efa951874e15 (diff)
downloadbrew-33ec48a3946c78c392d71a2b631414710f8beb8b.tar.bz2
Don't require the WHOLE of Homebrew from ARGV.rb
This was slowing down every instantiation of brew significantly. Hopefully doesn't break anything that had become accustomed to not having to require 'formula' or 'keg'. /cc @mikemcquaid
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ARGV.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 70d8f6daa..4b0c71d03 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -1,5 +1,3 @@
-require 'bottles'
-
module HomebrewArgvExtension
def named
@named ||= reject{|arg| arg[0..0] == '-'}
@@ -115,10 +113,12 @@ module HomebrewArgvExtension
end
def build_bottle?
+ require 'bottles'
bottles_supported? and include? '--build-bottle'
end
def build_from_source?
+ require 'bottles'
flag? '--build-from-source' or ENV['HOMEBREW_BUILD_FROM_SOURCE'] \
or not bottles_supported? or not options_only.empty?
end