aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os/mac
diff options
context:
space:
mode:
authorJack Nagel2014-12-16 15:27:36 -0500
committerJack Nagel2014-12-16 15:51:57 -0500
commita73ec7bd90624dc83f1f6b3bcee8eddb83d6a7b9 (patch)
tree954cc277c28d986f39adb032db0a9b87067166c5 /Library/Homebrew/os/mac
parent4b808be658a81e8312b95375fb75ebe3046da74e (diff)
downloadhomebrew-a73ec7bd90624dc83f1f6b3bcee8eddb83d6a7b9.tar.bz2
Use Utils.popen_read to avoid shelling out in a few places
Diffstat (limited to 'Library/Homebrew/os/mac')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index c4e53504f..5d5e02d9a 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -77,7 +77,7 @@ module OS
%W[#{prefix}/usr/bin/xcodebuild #{which("xcodebuild")}].uniq.each do |path|
if File.file? path
- `#{path} -version 2>/dev/null` =~ /Xcode (\d(\.\d)*)/
+ Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/
return $1 if $1
end
end