From 5a1846f77e56fbf8c945ee6ce469258b603d15bd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 24 Aug 2010 23:30:32 -0700 Subject: [PATCH] `vagrant reload` --- lib/vagrant/command/reload.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/vagrant/command/reload.rb diff --git a/lib/vagrant/command/reload.rb b/lib/vagrant/command/reload.rb new file mode 100644 index 000000000..fdcf00fbc --- /dev/null +++ b/lib/vagrant/command/reload.rb @@ -0,0 +1,18 @@ +module Vagrant + module Command + class ReloadCommand < Base + desc "Reload the environment, halting it then restarting it." + register "reload" + + def execute + target_vms.each do |vm| + if vm.created? + vm.reload + else + vm.env.ui.info "VM not created. Moving on..." + end + end + end + end + end +end