Created
April 7, 2017 23:48
-
-
Save BR0kEN-/cb75d55d74b998cc7ca9d9808e3c82c0 to your computer and use it in GitHub Desktop.
Check VM state in Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VagrantEnv = Vagrant::Environment.new() | |
if "running" == (VagrantEnv.machine_index.find{|machine| machine.vagrantfile_path == VagrantEnv.cwd}).state | |
puts "Machine is running!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment