Merge pull request #19943 from Homebrew/list-cask-versions

cmd/list: skip invalid Caskroom files
This commit is contained in:
Eric Knibbe 2025-05-15 16:01:57 +00:00 committed by GitHub
commit bdf738ef10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,7 @@ module Homebrew
sig { void }
def list_casks
casks = if args.no_named?
cask_paths = Cask::Caskroom.path.children.map do |path|
cask_paths = Cask::Caskroom.path.children.reject(&:file?).map do |path|
if path.symlink?
real_path = path.realpath
real_path.basename.to_s