aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-08-27 17:25:13 -0500
committerJack Nagel2014-08-27 17:25:13 -0500
commit81ec9a998f92c5e2cffbb7c8e8b961f5f1118fd5 (patch)
tree33b306c4ac0ee883ef1a124e0c8646619631e4ac /Library/Homebrew
parent74b14b628524e727ff08f43e93abf5d935d2aba2 (diff)
downloadhomebrew-81ec9a998f92c5e2cffbb7c8e8b961f5f1118fd5.tar.bz2
Explicitly pass options into the build object
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/build.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 006beefb0..29252ea99 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -4,6 +4,7 @@
old_trap = trap("INT") { exit! 130 }
require "global"
+require "build_options"
require "cxxstdlib"
require "keg"
require "extend/ENV"
@@ -13,8 +14,9 @@ require "fcntl"
class Build
attr_reader :formula, :deps, :reqs
- def initialize(formula)
+ def initialize(formula, options)
@formula = formula
+ @formula.build = BuildOptions.new(options, formula.options)
if ARGV.ignore_deps?
@deps = []
@@ -183,7 +185,10 @@ system "/usr/bin/sudo", "-k"
trap("INT", old_trap)
begin
- Build.new(ARGV.formulae.first).install
+ formula = ARGV.formulae.first
+ options = Options.create(ARGV.options_only)
+ build = Build.new(formula, options)
+ build.install
rescue Exception => e
e.continuation = nil if ARGV.debug?
Marshal.dump(e, error_pipe)