Skip to content

Commit

Permalink
Revert "Remove spec file before building"
Browse files Browse the repository at this point in the history
This reverts commit af60443.

The issue that led to introducing it was never reproduced. I tried to
repro with this patch and it still works just fine. Since this removal
is getting in the middle for some race conditions I'm facing, I'm
reverting the patch.
  • Loading branch information
deivid-rodriguez committed Nov 29, 2021
1 parent 843f1a0 commit 2dd267f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/rubygems/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ def spec
def install
pre_install_checks

FileUtils.rm_f File.join gem_home, 'specifications', spec.spec_name

run_pre_install_hooks

# Set loaded_from to ensure extension_dir is correct
Expand Down
3 changes: 0 additions & 3 deletions test/rubygems/test_gem_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -948,21 +948,18 @@ def test_install

Gem.pre_install do
assert_path_not_exist cache_file, 'cache file must not exist yet'
assert_path_not_exist spec_file, 'spec file must not exist yet'
true
end

Gem.post_build do
assert_path_exist gemdir, 'gem install dir must exist'
assert_path_exist rakefile, 'gem executable must exist'
assert_path_not_exist stub_exe, 'gem executable must not exist'
assert_path_not_exist spec_file, 'spec file must not exist yet'
true
end

Gem.post_install do
assert_path_exist cache_file, 'cache file must exist'
assert_path_exist spec_file, 'spec file must exist'
end

@newspec = nil
Expand Down

0 comments on commit 2dd267f

Please sign in to comment.