diff options
Diffstat (limited to 'lib/rubygems/ext/builder.rb')
-rw-r--r-- | lib/rubygems/ext/builder.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index c98ff643fc..99dd2c162c 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -55,7 +55,7 @@ class Gem::Ext::Builder end end - def self.run(command, results, command_name = nil, dir = Dir.pwd) + def self.run(command, results, command_name = nil, dir = Dir.pwd, env = {}) verbose = Gem.configuration.really_verbose begin @@ -70,9 +70,9 @@ class Gem::Ext::Builder require "open3" # Set $SOURCE_DATE_EPOCH for the subprocess. - env = { 'SOURCE_DATE_EPOCH' => Gem.source_date_epoch_string } + build_env = { 'SOURCE_DATE_EPOCH' => Gem.source_date_epoch_string }.merge(env) output, status = begin - Open3.capture2e(env, *command, :chdir => dir) + Open3.capture2e(build_env, *command, :chdir => dir) rescue => error raise Gem::InstallError, "#{command_name || class_name} failed#{error.message}" end |