lib/testlab/providers/vagrant.rb in testlab-0.8.1 vs lib/testlab/providers/vagrant.rb in testlab-0.8.2
- old
+ new
@@ -52,11 +52,11 @@
# Destroy Vagrant-controlled VM
def destroy
!self.exists? and raise VagrantError, MSG_NO_LAB
- self.down
- self.vagrant_cli("destroy", "--force", self.instance_id)
+ self.alive? and self.down
+ self.exists? and self.vagrant_cli("destroy", "--force", self.instance_id)
true
end
################################################################################