Skip to content

Commit

Permalink
Merge pull request #17465 from Homebrew/list-fix
Browse files Browse the repository at this point in the history
cmd/list: new fix for exit code when supplied both a cask and formula
  • Loading branch information
Bo98 committed Jun 11, 2024
2 parents c3c4434 + 617a8d1 commit 3f08c75
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Library/Homebrew/cmd/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def run
system_command! "find", args: casks.map(&:caskroom_path) + find_args, print_stdout: true if casks.present?
else
kegs.each { |keg| PrettyListing.new keg } if kegs.present?
list_casks if casks.present?
Cask::List.list_casks(*casks, one: args.public_send(:"1?")) if casks.present?
end
end
end
Expand All @@ -165,7 +165,10 @@ def filtered_list
Formula.racks
else
racks = args.named.map { |n| Formulary.to_rack(n) }
racks.select(&:exist?)
racks.select do |rack|
Homebrew.failed = true unless rack.exist?
rack.exist?
end
end
if args.pinned?
pinned_versions = {}
Expand All @@ -191,6 +194,7 @@ def list_casks
Cask::Caskroom.casks
else
filtered_args = args.named.dup.delete_if do |n|
Homebrew.failed = true unless Cask::Caskroom.path.join(n).exist?
!Cask::Caskroom.path.join(n).exist?
end
# NamedAargs subclasses array
Expand Down

2 comments on commit 3f08c75

@WhatDoIdonow1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o commits but 3f08c75 lol

@WhatDoIdonow1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geeking out

Please sign in to comment.