From a00dcd007965102160244a0cde0366e4825aa485 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 20 Apr 2014 16:51:45 -0500 Subject: [PATCH] Use a multiline conditional to make this code more readable --- Library/ENV/4.3/xcrun | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun index 0cef2bbfb7..3bcfa89e40 100755 --- a/Library/ENV/4.3/xcrun +++ b/Library/ENV/4.3/xcrun @@ -16,7 +16,10 @@ SUPERBIN = canonical_dirname(__FILE__) # Some build tools are stupid and still set DEVELOPER_DIR to old /Developer ENV.delete "DEVELOPER_DIR" -exec "/usr/bin/xcrun", *ARGV if ARGV.empty? or ARGV[0][0..0] == '-' +if ARGV.empty? || ARGV[0][0..0] == "-" + exec "/usr/bin/xcrun", *ARGV +end + if File.exist?("/usr/bin/#{ARGV.first}") sdkroot = ENV['HOMEBREW_SDKROOT'] exec "/usr/bin/#{ARGV.shift}", *ARGV unless sdkroot and File.directory? sdkroot