aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/xcrun9
1 files changed, 4 insertions, 5 deletions
diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun
index 1dca66b65..940358c2c 100755
--- a/Library/ENV/4.3/xcrun
+++ b/Library/ENV/4.3/xcrun
@@ -25,12 +25,11 @@ end
SUPERBIN = canonical_dirname(__FILE__)
-def try path
- exec path, *ARGV if File.executable?(path) && canonical_dirname(path) != SUPERBIN
-end
-
arg0 = ARGV.shift
-try `/usr/bin/xcrun --find #{arg0} 2>/dev/null`.chomp
+exe = `/usr/bin/xcrun --find #{arg0} 2>/dev/null`.chomp
+if File.executable?(exe) && canonical_dirname(exe) != SUPERBIN
+ exec(exe, *ARGV)
+end
paths = ENV["PATH"].split(File::PATH_SEPARATOR)
paths.delete(SUPERBIN)