diff options
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r-- | lib/rubygems/commands/check_command.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/commands/specification_command.rb | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/rubygems/commands/check_command.rb b/lib/rubygems/commands/check_command.rb index 4d1f8782b1..e3c288d659 100644 --- a/lib/rubygems/commands/check_command.rb +++ b/lib/rubygems/commands/check_command.rb @@ -40,7 +40,11 @@ class Gem::Commands::CheckCommand < Gem::Command def check_gems say "Checking gems..." say - gems = get_all_gem_names rescue [] + gems = begin + get_all_gem_names + rescue + [] + end Gem::Validator.new.alien(gems).sort.each do |key, val| unless val.empty? diff --git a/lib/rubygems/commands/specification_command.rb b/lib/rubygems/commands/specification_command.rb index 5cdf5966d2..6025660498 100644 --- a/lib/rubygems/commands/specification_command.rb +++ b/lib/rubygems/commands/specification_command.rb @@ -106,7 +106,11 @@ Specific fields in the specification can be extracted in YAML format: if local? if File.exist? gem - specs << Gem::Package.new(gem).spec rescue nil + begin + specs << Gem::Package.new(gem).spec + rescue + nil + end end if specs.empty? |