lib/nanoc/base/errors.rb in nanoc-4.7.7 vs lib/nanoc/base/errors.rb in nanoc-4.7.8

- old
+ new

@@ -73,10 +73,12 @@ cycle = graph.any_cycle msg_bits = [] msg_bits << 'The site cannot be compiled because there is a dependency cycle:' msg_bits << '' - cycle.each.with_index { |r, i| msg_bits << " (#{i + 1}) item #{r.item.identifier}, rep #{r.name.inspect}, depends on" } + cycle.reverse_each.with_index do |r, i| + msg_bits << " (#{i + 1}) item #{r.item.identifier}, rep #{r.name.inspect}, uses compiled content of" + end msg_bits.last << ' (1)' super(msg_bits.map { |x| x + "\n" }.join('')) end end