Revert "Always pass an Options instance to the BuildOptions constructor"

This reverts commit e143bcef259ca76b2124e6e73bd9bdf872418723.

Closes Homebrew/homebrew#31557.
Closes Homebrew/homebrew#31559.
Closes Homebrew/homebrew#31561.
Closes Homebrew/homebrew#31562.
This commit is contained in:
Mike McQuaid 2014-08-13 08:45:08 +01:00
parent d4aa7b8df0
commit 9f14262d92
3 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@ class BuildOptions
attr_accessor :universal
def initialize(args, options)
@args = args
@args = Options.coerce(args)
@options = options
end

View File

@ -34,7 +34,7 @@ class SoftwareSpec
@bottle_specification = BottleSpecification.new
@patches = []
@options = Options.new
@build = BuildOptions.new(Options.coerce(ARGV.options_only), options)
@build = BuildOptions.new(ARGV.options_only, options)
end
def owner= owner

View File

@ -3,8 +3,10 @@ require 'build_options'
class BuildOptionsTests < Homebrew::TestCase
def setup
args = Options.coerce(%w(--with-foo --with-bar --without-qux))
opts = Options.coerce(%w(--with-foo --with-bar --without-baz --without-qux))
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")
@build = BuildOptions.new(args, opts)
end