Always pass an Options instance to the BuildOptions constructor
This commit is contained in:
parent
a43f450544
commit
ecaf1592a0
@ -4,7 +4,7 @@ class BuildOptions
|
||||
attr_accessor :universal
|
||||
|
||||
def initialize(args, options)
|
||||
@args = Options.coerce(args)
|
||||
@args = args
|
||||
@options = options
|
||||
end
|
||||
|
||||
|
@ -34,7 +34,7 @@ class SoftwareSpec
|
||||
@bottle_specification = BottleSpecification.new
|
||||
@patches = []
|
||||
@options = Options.new
|
||||
@build = BuildOptions.new(ARGV.options_only, options)
|
||||
@build = BuildOptions.new(Options.coerce(ARGV.options_only), options)
|
||||
end
|
||||
|
||||
def owner= owner
|
||||
|
@ -3,10 +3,8 @@ require 'build_options'
|
||||
|
||||
class BuildOptionsTests < Homebrew::TestCase
|
||||
def setup
|
||||
args = %w{--with-foo --with-bar --without-qux}
|
||||
opts = Options.new
|
||||
opts << Option.new("with-foo") << Option.new("with-bar")
|
||||
opts << Option.new("without-baz") << Option.new("without-qux")
|
||||
args = Options.coerce(%w(--with-foo --with-bar --without-qux))
|
||||
opts = Options.coerce(%w(--with-foo --with-bar --without-baz --without-qux))
|
||||
@build = BuildOptions.new(args, opts)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user