lib/testlab/providers/vagrant.rb in testlab-0.8.3 vs lib/testlab/providers/vagrant.rb in testlab-0.8.4

- old
+ new

@@ -179,10 +179,20 @@ command = TestLab.build_command_line("vagrant", *args) @ui.logger.debug { "command == #{command.inspect}" } render_vagrantfile - ZTK::Command.new(:ui => @ui, :silence => true).exec(command) + result = ZTK::Command.new(:ui => @ui, :silence => true, :ignore_exit_status => true).exec(command) + + if result.exit_code != 0 + @ui.stderr.puts + @ui.stderr.puts + @ui.stderr.puts(result.output) + + raise VagrantError, "Vagrant failed to execute!" + end + + result end def render_vagrantfile context = { :id => self.instance_id,