diff options
author | Homu <homu@barosl.com> | 2016-03-30 08:04:13 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-03-30 08:04:13 +0900 |
commit | 015c1cb52b47c9f7f644652ffdaa7fefcfd0f815 (patch) | |
tree | 4ccf4e3e21975348dc9edcca63ee9cdf3a3d7696 /lib/bundler | |
parent | 755e1a49f29ecc87dbf619310326cc1057adf697 (diff) | |
parent | e2e8aa7d78b76cfb49404fa4226572df76fe0946 (diff) | |
download | bundler-015c1cb52b47c9f7f644652ffdaa7fefcfd0f815.tar.gz |
Auto merge of #4408 - bundler:seg-enotsup, r=indirect
[SharedHelpers] Handle Errno::ENOTSUP in .filesystem_access
Closes #4394.
\c @RochesterinNYC
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/errors.rb | 8 | ||||
-rw-r--r-- | lib/bundler/shared_helpers.rb | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/bundler/errors.rb b/lib/bundler/errors.rb index 7b893e66..f6c91501 100644 --- a/lib/bundler/errors.rb +++ b/lib/bundler/errors.rb @@ -107,4 +107,12 @@ module Bundler status_code(27) end + + class OperationNotSupportedError < PermissionError + def message + "Attempting to #{action} `#{@path}` is unsupported by your OS." + end + + status_code(28) + end end diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index c79c88c5..e21d616e 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -109,6 +109,8 @@ module Bundler raise TemporaryResourceError.new(path, action) rescue Errno::EPROTO raise VirtualProtocolError.new + rescue *[const_get_safely(:ENOTSUP, Errno)].compact + raise OperationNotSupportedError.new(path, action) end def const_get_safely(constant_name, namespace) |