From ca6927209f95cb51c86c3a0998dbf299a37a7586 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 25 Jun 2019 10:59:26 -0700 Subject: [PATCH] Respect --dest-dir when removing old default gems Before this, tool/rbinstall would try to remove a gem file that it may not have access too. Fixes issue introduced in f550da512cefbe0283106ca839c4836a98efaf3a. --- tool/rbinstall.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 56c43228ce..427d69f0f6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -827,7 +827,7 @@ def install_default_gem(dir, srcdir) spec } gems.compact.sort_by(&:name).each do |gemspec| - old_gemspecs = Dir[File.join(default_spec_dir, "#{gemspec.name}-*.gemspec")] + old_gemspecs = Dir[File.join(with_destdir(default_spec_dir), "#{gemspec.name}-*.gemspec")] if old_gemspecs.size > 0 old_gemspecs.each {|spec| FileUtils.rm spec } end -- 2.21.0