aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os
diff options
context:
space:
mode:
authorJack Nagel2014-07-11 15:51:19 -0500
committerJack Nagel2014-07-11 15:52:39 -0500
commit5c24b7330b6a212d68ca1f4def8dfb4ab1b6bb48 (patch)
tree475ae778966e0ef87eb86b095c5d14f35596e9ef /Library/Homebrew/os
parent677cd519778ab66e19699d847b03a2f3d958bd2a (diff)
downloadbrew-5c24b7330b6a212d68ca1f4def8dfb4ab1b6bb48.tar.bz2
Read if no block is passed to Utils.popen_read
Diffstat (limited to 'Library/Homebrew/os')
-rw-r--r--Library/Homebrew/os/mac.rb4
-rw-r--r--Library/Homebrew/os/mac/xquartz.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 5f245b23c..e896901ed 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -231,13 +231,13 @@ module OS
def mdfind(*ids)
return [] unless OS.mac?
(@mdfind ||= {}).fetch(ids) do
- @mdfind[ids] = Utils.popen_read("/usr/bin/mdfind", mdfind_query(*ids), &:read).split("\n")
+ @mdfind[ids] = Utils.popen_read("/usr/bin/mdfind", mdfind_query(*ids)).split("\n")
end
end
def pkgutil_info(id)
(@pkginfo ||= {}).fetch(id) do |key|
- @pkginfo[key] = Utils.popen_read("/usr/sbin/pkgutil", "--pkg-info", key, &:read).strip
+ @pkginfo[key] = Utils.popen_read("/usr/sbin/pkgutil", "--pkg-info", key).strip
end
end
diff --git a/Library/Homebrew/os/mac/xquartz.rb b/Library/Homebrew/os/mac/xquartz.rb
index eb30bca13..b48314699 100644
--- a/Library/Homebrew/os/mac/xquartz.rb
+++ b/Library/Homebrew/os/mac/xquartz.rb
@@ -57,7 +57,7 @@ module OS
def version_from_mdls(path)
version = Utils.popen_read(
- "/usr/bin/mdls", "-raw", "-nullMarker", "", "-name", "kMDItemVersion", path.to_s, &:read
+ "/usr/bin/mdls", "-raw", "-nullMarker", "", "-name", "kMDItemVersion", path.to_s
).strip
version unless version.empty?
end