summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-08-16 20:19:22 +0900
committergit <svn-admin@ruby-lang.org>2024-09-06 14:46:43 +0000
commit30176e3f238f198ae835bf1c593d2ad2dce2df49 (patch)
tree793332c61026fdbd0732daac253175c380b3a576 /lib
parent6dd917bd01f204e76d65137f2218d6305652f179 (diff)
[rubygems/rubygems] Ensure that the lock file will be removed
https://github.com/rubygems/rubygems/commit/2706acb271
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/installer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 8f95bab733..1085f73fca 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -546,7 +546,8 @@ class Gem::Installer
file.write app_script_text(filename)
file.chmod(options[:prog_mode] || 0o755)
end
- File.unlink(lock.path)
+ ensure
+ FileUtils.rm_f lock.path
end
verbose bin_script_path