rename source to from, change values
This commit is contained in:
parent
440fb185dd
commit
ac005fa4ce
@ -59,7 +59,7 @@ module Homebrew
|
|||||||
set_constraints(name, required_for: required_for, depends_on: depends_on)
|
set_constraints(name, required_for: required_for, depends_on: depends_on)
|
||||||
end
|
end
|
||||||
|
|
||||||
enable_switch(*names, source: :env_var) if !env.nil? && !ENV["HOMEBREW_#{env.to_s.upcase}"].nil?
|
enable_switch(*names, from: :env) if !env.nil? && !ENV["HOMEBREW_#{env.to_s.upcase}"].nil?
|
||||||
end
|
end
|
||||||
alias switch_option switch
|
alias switch_option switch
|
||||||
|
|
||||||
@ -173,9 +173,9 @@ module Homebrew
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def enable_switch(*names, source: :cli_arg)
|
def enable_switch(*names, from: :arg)
|
||||||
names.each do |name|
|
names.each do |name|
|
||||||
@switch_sources[option_to_name(name)] = source
|
@switch_sources[option_to_name(name)] = from
|
||||||
Homebrew.args["#{option_to_name(name)}?"] = true
|
Homebrew.args["#{option_to_name(name)}?"] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user