Skip to content
Browse files

catch stdout and stderr while looking for sudo

  • Loading branch information...
1 parent 4d4fa00 commit aa1741460091cb4bd576160874e3a75b61abb70b @indirect indirect committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/bundler.rb
  2. +1 −1 lib/bundler/cli.rb
View
2 lib/bundler.rb
@@ -196,7 +196,7 @@ def requires_sudo?
path = bundle_path
path = path.parent until path.exist?
- sudo_present = !(`which sudo 2>#{NULL}` rescue '').empty?
+ sudo_present = !(`which sudo 2>&1 >#{NULL}` rescue '').empty?
@checked_for_sudo = true
@requires_sudo = settings.allow_sudo? && !File.writable?(path) && sudo_present
View
2 lib/bundler/cli.rb
@@ -503,7 +503,7 @@ def self.source_root
private
def have_groff?
- system("which groff 2>#{NULL}") rescue false
+ system("which groff 2>&1 >#{NULL}") rescue false
end
def locate_gem(name)

0 comments on commit aa17414

Please sign in to comment.
Something went wrong with that request. Please try again.