Explicitly pass options into the build object
This commit is contained in:
parent
889996daf1
commit
9386902cf8
@ -4,6 +4,7 @@
|
|||||||
old_trap = trap("INT") { exit! 130 }
|
old_trap = trap("INT") { exit! 130 }
|
||||||
|
|
||||||
require "global"
|
require "global"
|
||||||
|
require "build_options"
|
||||||
require "cxxstdlib"
|
require "cxxstdlib"
|
||||||
require "keg"
|
require "keg"
|
||||||
require "extend/ENV"
|
require "extend/ENV"
|
||||||
@ -13,8 +14,9 @@ require "fcntl"
|
|||||||
class Build
|
class Build
|
||||||
attr_reader :formula, :deps, :reqs
|
attr_reader :formula, :deps, :reqs
|
||||||
|
|
||||||
def initialize(formula)
|
def initialize(formula, options)
|
||||||
@formula = formula
|
@formula = formula
|
||||||
|
@formula.build = BuildOptions.new(options, formula.options)
|
||||||
|
|
||||||
if ARGV.ignore_deps?
|
if ARGV.ignore_deps?
|
||||||
@deps = []
|
@deps = []
|
||||||
@ -183,7 +185,10 @@ system "/usr/bin/sudo", "-k"
|
|||||||
trap("INT", old_trap)
|
trap("INT", old_trap)
|
||||||
|
|
||||||
begin
|
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
|
rescue Exception => e
|
||||||
e.continuation = nil if ARGV.debug?
|
e.continuation = nil if ARGV.debug?
|
||||||
Marshal.dump(e, error_pipe)
|
Marshal.dump(e, error_pipe)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user