Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
fall back on the full index during has syck errors
Browse files Browse the repository at this point in the history
closes #1419
  • Loading branch information
indirect committed May 31, 2012
1 parent ef09911 commit 14a0648
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/bundler/fetcher.rb
Expand Up @@ -72,7 +72,7 @@ def specs(gem_names, source)
# 1. Gemcutter Endpoint doesn't return a 200
# 2. Marshal blob doesn't load properly
# 3. One of the YAML gemspecs has the Syck::DefaultKey problem
rescue HTTPError, TypeError => e
rescue HTTPError, TypeError, GemspecError => e
# new line now that the dots are over
Bundler.ui.info "" unless Bundler.ui.debug?

Expand Down Expand Up @@ -182,11 +182,10 @@ def fetch_dependency_remote_specs(gem_names)
rescue ArgumentError => e
if e.message.include?('Ill-formed requirement ["#<YAML::Syck::DefaultKey')
puts # we shouldn't print the error message on the "fetching info" status line
raise GemspecError, %{Unfortunately, the gem #{s[:name]} (#{s[:number]}) } +
%{has an invalid gemspec. As a result, Bundler cannot install this Gemfile. } +
%{Please ask the gem author to yank the bad version to fix this issue. For } +
%{more information, see http://bit.ly/syck-defaultkey. For a temporary } +
%{workaround try using the --full-index option.}
raise GemspecError,
"Unfortunately, the gem #{s[:name]} (#{s[:number]}) has an invalid gemspec. \n" \
"Please ask the gem author to yank the bad version to fix this issue. For \n" \
"more information, see http://bit.ly/syck-defaultkey."
else
raise e
end
Expand Down

0 comments on commit 14a0648

Please sign in to comment.