mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[rubygems/rubygems] Improve Bundler::GenericSystemCall error message
https://github.com/rubygems/rubygems/commit/ccd7e084a8
This commit is contained in:
parent
cc29d737ef
commit
055ed5f592
@ -116,7 +116,7 @@ module Bundler
|
||||
rescue Errno::EEXIST, Errno::ENOENT
|
||||
raise
|
||||
rescue SystemCallError => e
|
||||
raise GenericSystemCallError.new(e, "There was an error accessing `#{path}`.")
|
||||
raise GenericSystemCallError.new(e, "There was an error #{[:create, :write].include?(action) ? "creating" : "accessing"} `#{path}`.")
|
||||
end
|
||||
|
||||
def major_deprecation(major_version, message, removed_message: nil, print_caller_location: false)
|
||||
|
||||
@ -513,7 +513,7 @@ RSpec.describe Bundler::SharedHelpers do
|
||||
|
||||
it "raises a GenericSystemCallError" do
|
||||
expect { subject.filesystem_access("/path", &file_op_block) }.to raise_error(
|
||||
Bundler::GenericSystemCallError, /error accessing.+underlying.+Shields down/m
|
||||
Bundler::GenericSystemCallError, /error creating.+underlying.+Shields down/m
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user