Skip to content

Commit

Permalink
Unswallow Gem::Package::FormatError
Browse files Browse the repository at this point in the history
This error happen in a CI run, and as it is currently, it doesn't give
any useful information about the underlying cause. Let's not swallow the
original error.
  • Loading branch information
deivid-rodriguez committed Jul 1, 2020
1 parent 75dfe49 commit 8c17ba2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bundler/lib/bundler/rubygems_integration.rb
Expand Up @@ -251,8 +251,6 @@ def spec_from_gem(path, policy = nil)
require "rubygems/security"
require_relative "psyched_yaml"
gem_from_path(path, security_policies[policy]).spec
rescue Gem::Package::FormatError
raise GemspecError, "Could not read gem at #{path}. It may be corrupted."
rescue Exception, Gem::Exception, Gem::Security::Exception => e # rubocop:disable Lint/RescueException
if e.is_a?(Gem::Security::Exception) ||
e.message =~ /unknown trust policy|unsigned gem/i ||
Expand Down

0 comments on commit 8c17ba2

Please sign in to comment.