aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/utils')
-rw-r--r--Library/Homebrew/utils/popen.rb14
-rw-r--r--Library/Homebrew/utils/ruby.sh4
2 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/utils/popen.rb b/Library/Homebrew/utils/popen.rb
index 4e03711a1..2fa3ade46 100644
--- a/Library/Homebrew/utils/popen.rb
+++ b/Library/Homebrew/utils/popen.rb
@@ -1,20 +1,20 @@
module Utils
- def self.popen_read(*args, &block)
- popen(args, "rb", &block)
+ def self.popen_read(*args, **options, &block)
+ popen(args, "rb", options, &block)
end
- def self.popen_write(*args, &block)
- popen(args, "wb", &block)
+ def self.popen_write(*args, **options, &block)
+ popen(args, "wb", options, &block)
end
- def self.popen(args, mode)
+ def self.popen(args, mode, options = {})
IO.popen("-", mode) do |pipe|
if pipe
return pipe.read unless block_given?
yield pipe
else
- $stderr.reopen("/dev/null", "w")
- exec(*args)
+ options[:err] ||= :close unless ENV["HOMEBREW_STDERR"]
+ exec(*args, options)
end
end
end
diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh
index 0303da600..813bb0999 100644
--- a/Library/Homebrew/utils/ruby.sh
+++ b/Library/Homebrew/utils/ruby.sh
@@ -22,7 +22,7 @@ setup-ruby-path() {
if [[ $(readlink "$vendor_ruby_current_version") != "$(<"$vendor_dir/portable-ruby-version")" ]]
then
- if ! brew vendor-install ruby --quiet
+ if ! brew vendor-install ruby
then
onoe "Failed to upgrade vendor Ruby."
fi
@@ -42,7 +42,7 @@ setup-ruby-path() {
if [[ "$ruby_old_version" == "true" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" ]]
then
- brew vendor-install ruby --quiet
+ brew vendor-install ruby
if [[ ! -x "$vendor_ruby_path" ]]
then
odie "Failed to install vendor Ruby."