diff options
| author | Jack Nagel | 2014-07-11 15:29:26 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-11 15:41:54 -0500 |
| commit | 677cd519778ab66e19699d847b03a2f3d958bd2a (patch) | |
| tree | 4ed57ad105c23be9eb1b94fb6d057495634b2c7d /Library/Homebrew/os/mac | |
| parent | 72129668f432b9ddb5fa6a53c2573dd9b15e968e (diff) | |
| download | brew-677cd519778ab66e19699d847b03a2f3d958bd2a.tar.bz2 | |
Use Utils.popen_read in XQuartz version codepath
Diffstat (limited to 'Library/Homebrew/os/mac')
| -rw-r--r-- | Library/Homebrew/os/mac/xquartz.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/os/mac/xquartz.rb b/Library/Homebrew/os/mac/xquartz.rb index cec7bf9e6..eb30bca13 100644 --- a/Library/Homebrew/os/mac/xquartz.rb +++ b/Library/Homebrew/os/mac/xquartz.rb @@ -56,7 +56,9 @@ module OS end def version_from_mdls(path) - version = `mdls -raw -nullMarker "" -name kMDItemVersion "#{path}" 2>/dev/null`.strip + version = Utils.popen_read( + "/usr/bin/mdls", "-raw", "-nullMarker", "", "-name", "kMDItemVersion", path.to_s, &:read + ).strip version unless version.empty? end |
