Skip to content

Commit

Permalink
cmd/list: -t and -r support for some long options
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Sep 26, 2024
1 parent 05cde76 commit ba0fa55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Library/Homebrew/cmd/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ def run

raise UsageError, "Cannot use #{flags.join(", ")} with formula arguments." unless args.no_named?

Formula.installed.sort.each do |formula|
formulae = if args.t?

Check warning on line 125 in Library/Homebrew/cmd/list.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cmd/list.rb#L125

Added line #L125 was not covered by tests
Formula.installed.sort_by { |formula| test("M", formula.prefix.realpath) }.reverse!
else
Formula.installed.sort
end
formulae.reverse! if args.r?
formulae.each do |formula|

Check warning on line 131 in Library/Homebrew/cmd/list.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cmd/list.rb#L131

Added line #L131 was not covered by tests
tab = Tab.for_formula(formula)

statuses = []
Expand Down

0 comments on commit ba0fa55

Please sign in to comment.