dev-cmd/bump: sort formulae and casks by name
This commit is contained in:
parent
7d5216c500
commit
6efb37206f
@ -38,13 +38,16 @@ module Homebrew
|
|||||||
raise UsageError, "`--limit` must be used with either `--formula` or `--cask`."
|
raise UsageError, "`--limit` must be used with either `--formula` or `--cask`."
|
||||||
end
|
end
|
||||||
|
|
||||||
formulae_and_casks = if args.formula?
|
formulae_and_casks =
|
||||||
args.named.to_formulae.presence
|
if args.formula?
|
||||||
elsif args.cask?
|
args.named.to_formulae
|
||||||
args.named.to_casks.presence
|
elsif args.cask?
|
||||||
else
|
args.named.to_casks
|
||||||
args.named.to_formulae_and_casks.presence
|
else
|
||||||
end
|
args.named.to_formulae_and_casks
|
||||||
|
end&.sort_by do |formula_or_cask|
|
||||||
|
formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
|
||||||
|
end
|
||||||
|
|
||||||
limit = args.limit.to_i if args.limit.present?
|
limit = args.limit.to_i if args.limit.present?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user