summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext/builder.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2022-06-23 11:22:36 +0200
committerHiroshi SHIBATA <[email protected]>2022-06-24 10:52:02 +0900
commit12a5fa408bd318f8fb242e86beb225f2dcae8df9 (patch)
treef132650f5999535da69ee998956f260007afd371 /lib/rubygems/ext/builder.rb
parent333754ace8ae9bc5d2dfb4aee160fcfa0f38350d (diff)
Sync RubyGems & Bundler with upstream repo
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6054
Diffstat (limited to 'lib/rubygems/ext/builder.rb')
-rw-r--r--lib/rubygems/ext/builder.rb6
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