mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Merge upstream from rubygems/rubygems master branch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6f5eb28507
commit
3e047420d6
8 changed files with 92 additions and 42 deletions
|
@ -56,6 +56,7 @@ class Gem::Ext::Builder
|
|||
end
|
||||
|
||||
def self.redirector
|
||||
warn "#{caller[0]}: Use IO.popen(..., err: [:child, :out])"
|
||||
'2>&1'
|
||||
end
|
||||
|
||||
|
@ -63,7 +64,6 @@ class Gem::Ext::Builder
|
|||
verbose = Gem.configuration.really_verbose
|
||||
|
||||
begin
|
||||
# TODO use Process.spawn when ruby 1.8 support is dropped.
|
||||
rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], nil
|
||||
if verbose
|
||||
puts("current directory: #{Dir.pwd}")
|
||||
|
@ -71,9 +71,11 @@ class Gem::Ext::Builder
|
|||
system(command)
|
||||
else
|
||||
results << "current directory: #{Dir.pwd}"
|
||||
results << command
|
||||
results << `#{command} #{redirector}`
|
||||
results << (command.respond_to?(:shelljoin) ? command.shelljoin : command)
|
||||
results << IO.popen(command, "r", err: [:child, :out], &:read)
|
||||
end
|
||||
rescue => error
|
||||
raise Gem::InstallError, "#{command_name || class_name} failed#{error.message}"
|
||||
ensure
|
||||
ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue