aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/spec_set.rb
diff options
context:
space:
mode:
authorHemant Kumar <gethemant@gmail.com>2013-07-26 00:43:15 +0530
committerHemant Kumar <gethemant@gmail.com>2013-07-26 00:43:15 +0530
commitff269383b8572e9403a522a66e4be0837636f8ae (patch)
tree5e09b93451451c3fc14c099ac909e0a981d8feff /lib/bundler/spec_set.rb
parent1a493004fd0646d53633eadcb02de17b206289b9 (diff)
downloadbundler-ff269383b8572e9403a522a66e4be0837636f8ae.tar.gz
Raise user friendly errors in case of Cyclic Dependency
Fixes #2506
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r--lib/bundler/spec_set.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 2cdffdc8..202993e4 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -109,7 +109,12 @@ module Bundler
def sorted
rake = @specs.find { |s| s.name == 'rake' }
- @sorted ||= ([rake] + tsort).compact.uniq
+ begin
+ @sorted ||= ([rake] + tsort).compact.uniq
+ rescue TSort::Cyclic
+ raise CyclicDependencyError.new("Bundler has detected cyclic dependencies and can't" +
+ " proceed, update your Gemfile by removing cyclic dependency and rerun bundler.")
+ end
end
def lookup