cmd/install: tweak formula option code/output.
This commit is contained in:
parent
5a95d80b5e
commit
1226470b07
@ -148,19 +148,17 @@ module Homebrew
|
|||||||
"package into a Homebrew package."
|
"package into a Homebrew package."
|
||||||
switch "-g", "--git",
|
switch "-g", "--git",
|
||||||
description: "Create a Git repository, useful for creating patches to the software."
|
description: "Create a Git repository, useful for creating patches to the software."
|
||||||
|
|
||||||
ARGV.formulae.each do |f|
|
ARGV.formulae.each do |f|
|
||||||
next if f.options.empty?
|
next if f.options.empty?
|
||||||
f.options.each do |option|
|
f.options.each do |o|
|
||||||
formulae_options[option.flag] = option.description
|
name = o.flag
|
||||||
end
|
description = "`#{f.name}`: #{o.description}"
|
||||||
end
|
if name.end_with? "="
|
||||||
formulae_options.each do |option, description|
|
flag name, description: description
|
||||||
if option.end_with? "="
|
|
||||||
flag option,
|
|
||||||
description: description
|
|
||||||
else
|
else
|
||||||
switch option,
|
switch name, description: description
|
||||||
description: description
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user