diff options
| author | Jack Nagel | 2014-07-05 13:50:54 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-05 15:41:22 -0500 |
| commit | 2d8a3ac35a71641c786de9f41389a3e5003b7141 (patch) | |
| tree | 0ec4efd788bd3a10c14e48d354659c28763658eb /Library/Homebrew/cmd | |
| parent | ad27b21cd11a4e28f4174ebb54df357d6b6221a0 (diff) | |
| download | brew-2d8a3ac35a71641c786de9f41389a3e5003b7141.tar.bz2 | |
Use popen wrapper
Closes Homebrew/homebrew#30678.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 91901292b..7cc493506 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -63,7 +63,7 @@ module Homebrew end # Use strings to search through the file for each string - IO.popen("strings -t x - '#{file}'", "rb") do |io| + Utils.popen_read("strings", "-t", "x", "-", file.to_s) do |io| until io.eof? str = io.readline.chomp @@ -168,8 +168,8 @@ module Homebrew prefix_check = HOMEBREW_PREFIX end - relocatable = !keg_contains(prefix_check, keg) - relocatable = !keg_contains(HOMEBREW_CELLAR, keg) && relocatable + relocatable = !keg_contains(prefix_check.to_s, keg) + relocatable = !keg_contains(HOMEBREW_CELLAR.to_s, keg) && relocatable puts if !relocatable && ARGV.verbose? rescue Interrupt ignore_interrupts { bottle_path.unlink if bottle_path.exist? } diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index fd40cf6c6..3d5959ad2 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -27,7 +27,7 @@ class Volumes def get_mounts path=nil vols = [] # get the volume of path, if path is nil returns all volumes - raw_df = IO.popen("/bin/df -P #{path}", "rb", &:read) + raw_df = Utils.popen_read("/bin/df", "-P", path, &:read) raw_df.split("\n").each do |line| case line # regex matches: /dev/disk0s2 489562928 440803616 48247312 91% / |
