From bba97a28c726fcfd3bd9959755a4f3383512101a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 18 Jul 2010 08:54:24 -0700 Subject: [PATCH] Run the destroy sequence instead of the specific action for handling SIGINT in import --- lib/vagrant/action/vm/import.rb | 2 +- test/vagrant/action/vm/import_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/vm/import.rb b/lib/vagrant/action/vm/import.rb index 9348631c3..25b4a709f 100644 --- a/lib/vagrant/action/vm/import.rb +++ b/lib/vagrant/action/vm/import.rb @@ -25,7 +25,7 @@ module Vagrant @app.call(env) if !env.error? # Interrupted, destroy the VM - env["actions"].run(Destroy) if env.interrupted? + env["actions"].run(:destroy) if env.interrupted? end end end diff --git a/test/vagrant/action/vm/import_test.rb b/test/vagrant/action/vm/import_test.rb index 47d385695..b512f50b7 100644 --- a/test/vagrant/action/vm/import_test.rb +++ b/test/vagrant/action/vm/import_test.rb @@ -43,7 +43,7 @@ class ImportVMActionTest < Test::Unit::TestCase assert_equal @env, env @env.error!(:interrupt) end - @env.env.actions.expects(:run).with(Vagrant::Action::VM::Destroy).once + @env.env.actions.expects(:run).with(:destroy).once @instance.call(@env) end