bin/rconf in rconf-0.8.15 vs bin/rconf in rconf-0.8.16

- old
+ new

@@ -124,13 +124,17 @@ rubies.each do |ruby| ruby =~ /(\s+| =>)([^ ]*)\s.*/ ruby = Regexp.last_match(2) gemsets = Command.execute('rvm', ruby, 'exec', 'rvm', 'gemset', 'list').output.split("\n") i = gemsets.index { |gs| gs =~ /^gemsets for #{ruby} / } - gemsets = gemsets[i + 1..-1] - gemsets.each do |gs| - gs = gs.lstrip - callback.call(ruby, gs) + if i + gemsets = gemsets[i + 1..-1] + gemsets.each do |gs| + gs = gs.lstrip + callback.call(ruby, gs) + end + else + report_fatal 'Failed to retrieve installed gemsets' end end end # Update rconf for given rubies if required