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
commit9a2f2aee7ec4cf9fb0e02f0eb07eaaf3680ec608 (patch)
treef67b0a419ad8e9256e33f00529ba7424d56f40e3 /Library/Homebrew/os/mac
parent8c0928ccca77fbc6d32178d21370ce764c2eee5d (diff)
downloadbrew-9a2f2aee7ec4cf9fb0e02f0eb07eaaf3680ec608.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