method
run
v2_1_10 -
Show latest stable
-
0 notes -
Class: Builder
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
run(command, results, command_name = nil)
public
Hide source
# File lib/rubygems/ext/builder.rb, line 62 def self.run(command, results, command_name = nil) 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(command) system(command) else results << command results << `#{command} #{redirector}` end ensure ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps end unless $?.success? then results << "Building has failed. See above output for more information on the failure." if verbose exit_reason = if $?.exited? then ", exit code #{$?.exitstatus}" elsif $?.signaled? then ", uncaught signal #{$?.termsig}" end raise Gem::InstallError, "#{command_name || class_name} failed#{exit_reason}" end end