diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/commands/fetch_command.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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 |