Try matching key type
This commit is contained in:
parent
a81b6a4b44
commit
c17ffb8c3b
@ -62,13 +62,12 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
json = {
|
json = {
|
||||||
"formulae" => json_info(formulae),
|
formulae: json_info(formulae),
|
||||||
"casks" => json_info(casks),
|
casks: json_info(casks),
|
||||||
}
|
}
|
||||||
puts JSON.pretty_generate(json)
|
puts JSON.pretty_generate(json)
|
||||||
|
|
||||||
outdated = formulae + casks
|
outdated = formulae + casks
|
||||||
|
|
||||||
else
|
else
|
||||||
outdated = if args.formula?
|
outdated = if args.formula?
|
||||||
outdated_formulae
|
outdated_formulae
|
||||||
@ -170,10 +169,7 @@ module Homebrew
|
|||||||
"v1" => :v1,
|
"v1" => :v1,
|
||||||
"v2" => :v2,
|
"v2" => :v2,
|
||||||
}
|
}
|
||||||
|
version_hash.fetch(version) { raise UsageError, "invalid JSON version: #{version}" }
|
||||||
raise UsageError, "invalid JSON version: #{version}" unless version_hash.include?(version)
|
|
||||||
|
|
||||||
version_hash[version]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { returns(T::Array[Formula]) }
|
sig { returns(T::Array[Formula]) }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user