From a304fe00f3db3719f7dbb6942e7e65e49d760c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 6 Sep 2024 11:55:02 +0200 Subject: [rubygems/rubygems] Fix `gem fetch` always exiting with zero status code https://github.com/rubygems/rubygems/commit/5887e6dfa1 --- lib/rubygems/commands/fetch_command.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib') diff --git a/lib/rubygems/commands/fetch_command.rb b/lib/rubygems/commands/fetch_command.rb index f7f5b62306..c524cf7922 100644 --- a/lib/rubygems/commands/fetch_command.rb +++ b/lib/rubygems/commands/fetch_command.rb @@ -63,6 +63,17 @@ then repackaging it. def execute check_version + + exit_code = fetch_gems + + terminate_interaction exit_code + end + + private + + def fetch_gems + exit_code = 0 + version = options[:version] platform = Gem.platforms.last @@ -86,10 +97,13 @@ then repackaging it. if spec.nil? show_lookup_failure gem_name, gem_version, errors, suppress_suggestions, options[:domain] + exit_code |= 2 next end source.download spec say "Downloaded #{spec.full_name}" end + + exit_code end end -- cgit v1.2.3