Skip to content

Commit 8f00960

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Handle Errno::EADDRNOTAVAIL gracefully
As showed by the unskiped spec, on Windows trying to use the 0.0.0.0 interface raises this error, and it's raised as a generic system error when trying to create a `bundler.lock` file. Here's is a better place to handle that. ruby/rubygems@e32c5a9e5c
1 parent 7fe1fc3 commit 8f00960

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/bundler/fetcher.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def initialize(remote_uri)
7676
Gem::Timeout::Error,
7777
EOFError,
7878
SocketError,
79+
Errno::EADDRNOTAVAIL,
7980
Errno::ENETDOWN,
8081
Errno::ENETUNREACH,
8182
Errno::EINVAL,

spec/bundler/commands/install_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,6 @@
690690
end
691691

692692
it "gracefully handles error when rubygems server is unavailable" do
693-
skip "networking issue" if Gem.win_platform?
694-
695693
install_gemfile <<-G, artifice: nil, raise_on_error: false
696694
source "https://gem.repo1"
697695
source "http://0.0.0.0:9384" do

0 commit comments

Comments
 (0)