summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-04-23 20:15:30 +0200
committergit <svn-admin@ruby-lang.org>2024-04-29 08:57:35 +0000
commitd6cb62a88f4d31548dfedd1cdb4082be8b7ced2e (patch)
treef9c056ee90ece94f00e059d7b12140d4ac9e9287 /lib
parent68a1867f53c5343a72a436fe75eccafdbcb41ce0 (diff)
[rubygems/rubygems] Show better error when installed gemspecs are unreadable
https://github.com/rubygems/rubygems/commit/924f87c8a9
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/rubygems_ext.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index e0582beba2..a7539f4adb 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -146,6 +146,18 @@ module Gem
end
end
+ module BetterPermissionError
+ def data
+ Bundler::SharedHelpers.filesystem_access(loaded_from, :read) do
+ super
+ end
+ end
+ end
+
+ class StubSpecification
+ prepend BetterPermissionError
+ end
+
class Dependency
include ::Bundler::ForcePlatform