Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Auto merge of #6554 - bundler:segiddins/read-file-error, r=segiddins
Browse files Browse the repository at this point in the history
Use filesystem_access when reading a Gemfile

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

The problem was users would see an issue template when their `Gemfile` did not have read permissions

Fixes #6541

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

My fix is to use `SharedHelpers.filesystem_access` when reading the Gemfile
  • Loading branch information
bundlerbot committed May 26, 2018
2 parents 197ef09 + c37607c commit f7ad611
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ def sudo(str)
end

def read_file(file)
File.open(file, "rb", &:read)
SharedHelpers.filesystem_access(file, :read) do
File.open(file, "rb", &:read)
end
end

def load_marshal(data)
Expand Down

0 comments on commit f7ad611

Please sign in to comment.