Skip to content
Snippets Groups Projects
Commit 2a81f8c3 authored by Jack Nagel's avatar Jack Nagel
Browse files

xcrun wrapper: inline try method

parent c6c9aa54
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment