lib/percheron/commands/list.rb in percheron-0.6.4 vs lib/percheron/commands/list.rb in percheron-0.7.0

- old
+ new

@@ -3,12 +3,16 @@ class List < Abstract parameter('STACK_NAME', 'stack name', required: false) def execute - Stack.get(config, stack_name).each do |stack_name, stack| - puts - puts Percheron::Formatters::Stack::Table.new(stack).generate + Stack.get(config, stack_name).each do |_, stack| + begin + stack.valid? + puts("\n", Percheron::Formatters::Stack::Table.new(stack).generate) + rescue Percheron::Errors::StackInvalid => e + signal_usage_error(e.message) + end end end end end end