From 7029810c181e2a5aff96ae6911171fbc0d3b35b0 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 7 Oct 2014 17:23:09 -0500 Subject: [PATCH] Fix install_name_tool check when Xcode license isn't accepted yet Fixes Homebrew/homebrew#32712. --- Library/Homebrew/cmd/doctor.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 2910d05b74..29decd0ebd 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -349,7 +349,11 @@ end def check_for_bad_install_name_tool return if MacOS.version < "10.9" - libs = `otool -L /usr/bin/install_name_tool` + libs = Pathname.new("/usr/bin/install_name_tool").dynamically_linked_libraries + + # otool may not work, for example if the Xcode license hasn't been accepted yet + return if libs.empty? + unless libs.include? "/usr/lib/libxcselect.dylib" then <<-EOS.undent You have an outdated version of /usr/bin/install_name_tool installed. This will cause binary package installations to fail.