From c874d3e4e326e555ed0c6efe88dcfd83e76bdd54 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 5 Dec 2013 16:39:39 -0600 Subject: bottle: fix reporting matches with spaces in them --- Library/Homebrew/cmd/bottle.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 12eff8831..ceaa3fa93 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -77,10 +77,9 @@ module Homebrew extend self # Use strings to search through the file for each string strings = `strings -t x - "#{file}"`.select{ |str| str.include? string }.map{ |s| s.strip } - # Don't bother reporting a string if it was found by otool - strings.reject!{ |str| linked_libraries.include? str.split[1] } strings.each do |str| - offset, match = str.split + offset, match = str.split(" ", 2) + next if linked_libraries.include? match # Don't bother reporting a string if it was found by otool puts " #{Tty.gray}-->#{Tty.reset} match '#{match}' at offset #{Tty.em}0x#{offset}#{Tty.reset}" end end -- cgit v1.2.3