aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/bottle.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 935ca149e..1e5ec4ba3 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -72,14 +72,13 @@ module Homebrew extend self
keg_ref_files.each do |file|
puts "#{Tty.red}#{file}#{Tty.reset}"
- linked_libraries = []
-
# Check dynamic library linkage. Importantly, do not run otool on static
# libraries, which will falsely report "linkage" to themselves.
if file.mach_o_executable? or file.dylib? or file.mach_o_bundle?
- linked_libraries.concat `otool -L "#{file}"`.split("\n").drop(1)
- linked_libraries.map! { |lib| lib[Keg::OTOOL_RX, 1] }
+ linked_libraries = file.dynamically_linked_libraries
linked_libraries = linked_libraries.select { |lib| lib.include? string }
+ else
+ linked_libraries = []
end
linked_libraries.each do |lib|