From 30176e3f238f198ae835bf1c593d2ad2dce2df49 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 16 Aug 2024 20:19:22 +0900 Subject: [rubygems/rubygems] Ensure that the lock file will be removed https://github.com/rubygems/rubygems/commit/2706acb271 --- lib/rubygems/installer.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3