cmd/list: skip invalid Caskroom files

This commit is contained in:
Eric Knibbe 2025-05-13 15:21:19 -04:00
parent ef314d9435
commit 28b1b74607
No known key found for this signature in database

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