diff options
Diffstat (limited to 'lib/rubygems/ext/builder.rb')
-rw-r--r-- | lib/rubygems/ext/builder.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index 81b96e84a9..d7d953fec3 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -43,12 +43,18 @@ class Gem::Ext::Builder def self.run(command, results, command_name = nil) verbose = Gem.configuration.really_verbose - if verbose - puts(command) - system(command) - else - results << command - results << `#{command} #{redirector}` + begin + # TODO use Process.spawn when ruby 1.8 support is dropped. + rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], nil + if verbose + puts(command) + system(command) + else + results << command + results << `#{command} #{redirector}` + end + ensure + ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps end unless $?.success? then |