Move used_options and unused_options to ARGV.
This commit is contained in:
parent
90010f4602
commit
ebbc3438a1
@ -7,6 +7,14 @@ module HomebrewArgvExtension
|
||||
select {|arg| arg[0..0] == '-'}
|
||||
end
|
||||
|
||||
def used_options f
|
||||
f.build.as_flags & options_only
|
||||
end
|
||||
|
||||
def unused_options f
|
||||
f.build.as_flags - options_only
|
||||
end
|
||||
|
||||
def formulae
|
||||
require 'formula'
|
||||
@formulae ||= downcased_unique_named.map{ |name| Formula.factory name }
|
||||
|
||||
@ -9,14 +9,8 @@ require 'vendor/multi_json'
|
||||
# `Tab.for_install`.
|
||||
class Tab < OpenStruct
|
||||
def self.for_install f, args
|
||||
# Retrieve option flags from command line.
|
||||
arg_options = args.options_only
|
||||
# Pick off the option flags from the formula's `options` array by
|
||||
# discarding the descriptions.
|
||||
formula_options = f.build.as_flags
|
||||
|
||||
Tab.new :used_options => formula_options & arg_options,
|
||||
:unused_options => formula_options - arg_options,
|
||||
Tab.new :used_options => args.used_options(f),
|
||||
:unused_options => args.unused_options(f),
|
||||
:tabfile => f.prefix + "INSTALL_RECEIPT.json",
|
||||
:built_bottle => !!args.build_bottle?,
|
||||
:tapped_from => f.tap
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user