summaryrefslogtreecommitdiff
path: root/lib/bundler/errors.rb
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2021-10-14 12:03:57 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-10-25 20:48:51 +0900
commitb4a43e4f577807303b0e465a27eefff2793fe3ea (patch)
tree034742921d7ba4295fa37b1e302f1fe59ded99cf /lib/bundler/errors.rb
parent00412be20469407cd6da813eab6bfa5b63cd945f (diff)
[rubygems/rubygems] Show proper error when previous installation of gem can't be deleted
Instead of showing the bug report template with an error at a random place. https://github.com/rubygems/rubygems/commit/882ad3ab57
Diffstat (limited to 'lib/bundler/errors.rb')
-rw-r--r--lib/bundler/errors.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/errors.rb b/lib/bundler/errors.rb
index 59898cd252..9ad7460e58 100644
--- a/lib/bundler/errors.rb
+++ b/lib/bundler/errors.rb
@@ -79,6 +79,10 @@ module Bundler
case @permission_type
when :create
"executable permissions for all parent directories and write permissions for `#{parent_folder}`"
+ when :delete
+ permissions = "executable permissions for all parent directories and write permissions for `#{parent_folder}`"
+ permissions += ", and the same thing for all subdirectories inside #{@path}" if File.directory?(@path)
+ permissions
else
"#{@permission_type} permissions for that path"
end