display_items: handle nil keys
This commit is contained in:
parent
81042c63fb
commit
0513d9de5c
@ -22,11 +22,8 @@ class LinkageChecker
|
|||||||
end
|
end
|
||||||
|
|
||||||
def dylib_to_dep(dylib)
|
def dylib_to_dep(dylib)
|
||||||
if dylib =~ %r{#{Regexp.escape(HOMEBREW_PREFIX)}/(opt|Cellar)/([\w+-.@]+)/}
|
dylib =~ %r{#{Regexp.escape(HOMEBREW_PREFIX)}/(opt|Cellar)/([\w+-.@]+)/}
|
||||||
Regexp.last_match(2)
|
Regexp.last_match(2)
|
||||||
else
|
|
||||||
"Not a Homebrew library"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_dylibs
|
def check_dylibs
|
||||||
@ -170,7 +167,7 @@ class LinkageChecker
|
|||||||
return if things.empty?
|
return if things.empty?
|
||||||
puts "#{label}:"
|
puts "#{label}:"
|
||||||
if things.is_a? Hash
|
if things.is_a? Hash
|
||||||
things.sort.each do |list_label, list|
|
things.sort_by { |k, _| k.to_s }.each do |list_label, list|
|
||||||
list.sort.each do |item|
|
list.sort.each do |item|
|
||||||
puts " #{item} (#{list_label})"
|
puts " #{item} (#{list_label})"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user