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

Don't show bug report template when GEM_HOME has no writable bit #7113

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Oct 26, 2023

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

Bug report template being displayed to users: #7111.

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

My fix is to remove raising if GEM_HOME does not satisfy File.writable?.

Instead, don't check that at all and proceed.

If something fails to be written inside GEM_HOME, we'll eventually fail with a proper permissions error.

In addition to that, the writable bit in GEM_HOME is not even reliable, because only the immediate parent is actually checked when writing. For example,

$ mkdir -p foo/bar
$ chmod -w foo
$ touch foo/bar/baz # writes without issue

Closes #7111.

Make sure the following tasks are checked

Instead, don't check that at all and proceed. If something fails to be
written inside GEM_HOME, we'll eventually fail with a proper permissions
error.

In addition to that, the writable bit in GEM_HOME is not even reliable,
because only the immediate parent is actually checked when writing. For
example,

```
$ mkdir -p foo/bar
$ chmod -w foo
$ touch foo/bar/baz # writes without issue
```
@deivid-rodriguez deivid-rodriguez merged commit 15ee7fc into master Oct 27, 2023
92 checks passed
@deivid-rodriguez deivid-rodriguez deleted the bundler-permissions-crash branch October 27, 2023 19:01
deivid-rodriguez added a commit that referenced this pull request Nov 8, 2023
Don't show bug report template when GEM_HOME has no writable bit

(cherry picked from commit 15ee7fc)
deivid-rodriguez added a commit that referenced this pull request Nov 8, 2023
Don't show bug report template when GEM_HOME has no writable bit

(cherry picked from commit 15ee7fc)
deivid-rodriguez added a commit that referenced this pull request Nov 8, 2023
Don't show bug report template when GEM_HOME has no writable bit

(cherry picked from commit 15ee7fc)
deivid-rodriguez added a commit that referenced this pull request Nov 8, 2023
Don't show bug report template when GEM_HOME has no writable bit

(cherry picked from commit 15ee7fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants