diff options
| author | Jack Nagel | 2013-01-23 00:26:28 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-01-26 12:14:47 -0600 |
| commit | cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129 (patch) | |
| tree | def0a5578f371e60cf1d340637f9b9f33d97d2f1 /Library/Homebrew/dependencies.rb | |
| parent | 046d802d0994be84802c6c50b6336b27b6d8ddd5 (diff) | |
| download | brew-cf08b71bf8dc94eaaeb1b0cde68b97a7e02ca129.tar.bz2 | |
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.
Diffstat (limited to 'Library/Homebrew/dependencies.rb')
| -rw-r--r-- | Library/Homebrew/dependencies.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb index 404a34903..561294fb1 100644 --- a/Library/Homebrew/dependencies.rb +++ b/Library/Homebrew/dependencies.rb @@ -138,7 +138,7 @@ module Dependable end def options - Options.new((tags - RESERVED_TAGS).map { |o| Option.new(o) }) + Options.coerce(tags - RESERVED_TAGS) end end |
