Skip to content

Commit a760719

Browse files
Dominic Clealdrbrain
authored andcommitted
Remove siteconf temp file once unused
Clean up the sitearch temp file before running any make commands to prevent the temp file being copied into the gem installation.
1 parent 4fcd98b commit a760719

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/rubygems/ext/ext_conf_builder.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def self.build(extension, directory, dest_path, results, args=[])
3737
run cmd, results
3838

3939
ENV["DESTDIR"] = nil
40+
siteconf.unlink
4041

4142
make dest_path, results
4243

test/rubygems/test_gem_ext_ext_conf_builder.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_class_build
3434
assert_equal "creating Makefile\n", output[1]
3535
assert_contains_make_command '', output[2]
3636
assert_contains_make_command 'install', output[4]
37+
assert_empty Dir.glob(File.join(@ext, 'siteconf*.rb'))
3738
end
3839

3940
def test_class_build_rbconfig_make_prog

0 commit comments

Comments
 (0)