summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-11-13 01:34:29 -0600
committerAndre Arko <andre@arko.net>2010-11-13 01:34:29 -0600
commitaa1741460091cb4bd576160874e3a75b61abb70b (patch)
tree618806c10156878cadc13d728e36d63788ae6d43
parent4d4fa00f2fd1c6ba420eb55cff884956b5aad68e (diff)
downloadbundler-aa1741460091cb4bd576160874e3a75b61abb70b.tar.gz
catch stdout and stderr while looking for sudov1.0.4
-rw-r--r--lib/bundler.rb2
-rw-r--r--lib/bundler/cli.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 15787d4ab4..0d538b761f 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -196,7 +196,7 @@ module Bundler
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
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 4ed9fdb64a..54085a4ca8 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -503,7 +503,7 @@ module Bundler
private
def have_groff?
- system("which groff 2>#{NULL}") rescue false
+ system("which groff 2>&1 >#{NULL}") rescue false
end
def locate_gem(name)