locate: Suppress stderr

Suppress the error message:
xcrun: error: unable to find utility "gcc-4.0", not a developer tool or in PATH
This commit is contained in:
Shaun Jackman 2017-09-19 10:19:56 -07:00
parent 58a1bd6dbf
commit 8bb57187ab

View File

@ -9,7 +9,7 @@ class DevelopmentTools
@locate[key] = if (located_tool = original_locate(tool))
located_tool
elsif MacOS.version > :tiger
path = Utils.popen_read("/usr/bin/xcrun", "-no-cache", "-find", tool).chomp
path = Utils.popen_read("/usr/bin/xcrun", "-no-cache", "-find", tool, err: :close).chomp
Pathname.new(path) if File.executable?(path)
end
end