Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show better error when installed gemspecs are unreadable #7603

Merged
merged 1 commit into from Apr 29, 2024

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user or developer problem that led to this PR?

Bug report template is printed when an installed gemspec is unreadable.

What is your fix for the problem, implemented in this PR?

Make sure we raise an error class that results in a nice error being printed instead of the error report template. Now the error is like this:

$ bundle install
Fetching gem metadata from https://rubygems.org/.
There was an error while trying to read from `/path/to/ruby/3.3.0/lib/ruby/gems/3.3.0/specifications/debug-1.9.1.gemspec`. It is likely that you need to grant read permissions for that path.

Fixes #7586.

Make sure the following tasks are checked

@segiddins
Copy link
Member

Could we instead wrap the access in a filesystem_access block?

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/better-unreadable-error branch from 1b962cd to 924f87c Compare April 25, 2024 10:52
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review April 25, 2024 10:53
@deivid-rodriguez
Copy link
Member Author

Good idea, just made that change!

@deivid-rodriguez deivid-rodriguez merged commit 4e7e56f into master Apr 29, 2024
83 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/better-unreadable-error branch April 29, 2024 08:57
deivid-rodriguez added a commit that referenced this pull request Apr 30, 2024
…able-error

Show better error when installed gemspecs are unreadable

(cherry picked from commit 4e7e56f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants