summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-06-25 10:59:26 -0700
committerJeremy Evans <code@jeremyevans.net>2019-06-25 19:02:48 -0700
commit51361272f9efca3eb0e1acb620ac62b576ddbb04 (patch)
tree52a1a6838afb71f90998f250b7098ccf0549c99c /tool/rbinstall.rb
parenta3d1cacda634b83032f79774d9a0e9e0c9c24cc8 (diff)
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.
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb2
1 files changed, 1 insertions, 1 deletions
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