summaryrefslogtreecommitdiff
path: root/lib/rubygems/installer.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2021-04-15 12:47:18 +0900
committerHiroshi SHIBATA <[email protected]>2021-04-15 15:36:15 +0900
commit96741765d880b700933526a97a67345dfcd90c47 (patch)
tree565766c43e97b7deb93f2390af955465a85ee668 /lib/rubygems/installer.rb
parented149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 (diff)
Merge the master branch of RubyGems
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4383
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r--lib/rubygems/installer.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 3ec6d743a2..7af51056b7 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -484,8 +484,11 @@ class Gem::Installer
bin_path = File.join gem_dir, spec.bindir, filename
unless File.exist? bin_path
- # TODO change this to a more useful warning
- warn "`#{bin_path}` does not exist, maybe `gem pristine #{spec.name}` will fix it?"
+ if File.symlink? bin_path
+ alert_warning "`#{bin_path}` is dangling symlink pointing to `#{File.readlink bin_path}`"
+ else
+ alert_warning "`#{bin_path}` does not exist, maybe `gem pristine #{spec.name}` will fix it?"
+ end
next
end