lib/testlab/providers/vagrant.rb in testlab-0.6.7 vs lib/testlab/providers/vagrant.rb in testlab-0.6.8
- old
+ new
@@ -89,10 +89,10 @@
################################################################################
# Inquire the state of the Vagrant-controlled VM
def state
- output = self.vagrant_cli("status | grep '#{self.instance_id}'").output
+ output = self.vagrant_cli("status").output.grep(/#{self.instance_id}/).first
result = UNKNOWN_STATE
ALL_STATES.map{ |s| s.to_s.gsub('_', ' ') }.each do |state|
if output =~ /#{state}/
result = state.to_s.gsub(' ', '_')
break