Skip to content

Commit

Permalink
catch stdout and stderr while looking for sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Nov 13, 2010
1 parent 4d4fa00 commit aa17414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bundler.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/cli.rb
Expand Up @@ -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)
Expand Down

0 comments on commit aa17414

Please sign in to comment.