[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.

e32c5a9e5c
This commit is contained in:
David Rodríguez 2025-06-18 14:24:36 +02:00 committed by Hiroshi SHIBATA
parent 7fe1fc392e
commit 8f009601f9
2 changed files with 1 additions and 2 deletions

View file

@ -76,6 +76,7 @@ module Bundler
Gem::Timeout::Error,
EOFError,
SocketError,
Errno::EADDRNOTAVAIL,
Errno::ENETDOWN,
Errno::ENETUNREACH,
Errno::EINVAL,

View file

@ -690,8 +690,6 @@ RSpec.describe "bundle install with gem sources" do
end
it "gracefully handles error when rubygems server is unavailable" do
skip "networking issue" if Gem.win_platform?
install_gemfile <<-G, artifice: nil, raise_on_error: false
source "https://gem.repo1"
source "http://0.0.0.0:9384" do