diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 13:04:10 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 22:17:52 +0100 |
commit | fe7d8a26927376a3256c0d3c896381d8aee751c4 (patch) | |
tree | 14299b8e95339ceb9a4e8ccccbce9cd1201ade27 | |
parent | 234041f0bf1c51ed0436602a33f6921396e9612d (diff) | |
download | bundler-fe7d8a26927376a3256c0d3c896381d8aee751c4.tar.gz |
Previous fix didn't work
-rw-r--r-- | lib/bundler/shared_helpers.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 6e83bc5ff4..5d134a4f86 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -111,7 +111,7 @@ module Bundler raise NoSpaceOnDeviceError.new(path, action) rescue *[const_get_safely(:ENOTSUP, Errno)].compact raise OperationNotSupportedError.new(path, action) - rescue Errno::EEXIST, Errno::ENOENT + rescue Errno::EEXIST, Errno::ENOENT, Errno::EINVAL raise rescue SystemCallError => e raise GenericSystemCallError.new(e, "There was an error accessing `#{path}`.") diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb index 92aed4d0ef..3015635846 100644 --- a/lib/bundler/source/git/git_proxy.rb +++ b/lib/bundler/source/git/git_proxy.rb @@ -125,7 +125,7 @@ module Bundler end git_retry %(clone --no-checkout --quiet "#{path}" "#{destination}") File.chmod(((File.stat(destination).mode | 0o777) & ~File.umask), destination) - rescue Errno::EEXIST => e + rescue Errno::EEXIST, Errno::EINVAL => e file_path = e.message[%r{.*?((?:[a-zA-Z]:)?/.*)}, 1] raise GitError, "Bundler could not install a gem because it needs to " \ "create a directory, but a file exists - #{file_path}. Please delete " \ |