linkage: avoid checking symlinks/directories

Prevent raising an error when `HOMEBREW_RUBY_MACHO=1` is set. Skipping
symlinks and directories while iterating over a directory structure to
find Mach-O binaries makes sense and similar logic is applied elsewhere.
This commit is contained in:
Martin Afanasjew 2016-06-19 21:10:05 +02:00
parent af94c4fc50
commit 7812b500b8

View File

@ -48,6 +48,7 @@ module Homebrew
def check_dylibs
@keg.find do |file|
next if file.symlink? || file.directory?
next unless file.dylib? || file.mach_o_executable? || file.mach_o_bundle?
file.dynamically_linked_libraries.each do |dylib|
if dylib.start_with? "@"