From cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 23 Jan 2013 00:26:28 -0600 Subject: FormulaInstaller: construct new ARGV from an Options collection The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well. --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/formula.rb') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e5b5d58fc..c877adb84 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -690,7 +690,7 @@ private end def build - @build ||= BuildOptions.new(ARGV) + @build ||= BuildOptions.new(ARGV.options_only) end def url val=nil, specs=nil -- cgit v1.2.3