Export returns immediately if an error is there prior to the export [closes GH-117]
This commit is contained in:
parent
457f6967d1
commit
940693287d
|
@ -13,6 +13,7 @@ module Vagrant
|
|||
@env = env
|
||||
|
||||
return env.error!(:vm_power_off_to_package) if !@env["vm"].vm.powered_off?
|
||||
return if env.error?
|
||||
|
||||
setup_temp_dir
|
||||
export
|
||||
|
|
|
@ -40,6 +40,17 @@ class ExportVMActionTest < Test::Unit::TestCase
|
|||
assert @env.error?
|
||||
assert_equal :vm_power_off_to_package, @env.error.first
|
||||
end
|
||||
|
||||
should "halt the chain if env error" do
|
||||
@internal_vm.stubs(:powered_off?).returns(true)
|
||||
@instance.expects(:setup_temp_dir).never
|
||||
@instance.expects(:export).never
|
||||
@app.expects(:call).with(@env).never
|
||||
@instance.expects(:cleanup).never
|
||||
|
||||
@env.error!(:interrupt)
|
||||
@instance.call(@env)
|
||||
end
|
||||
end
|
||||
|
||||
context "cleaning up" do
|
||||
|
|
|
@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Mitchell Hashimoto", "John Bender"]
|
||||
s.date = %q{2010-07-21}
|
||||
s.date = %q{2010-07-22}
|
||||
s.default_executable = %q{vagrant}
|
||||
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
|
||||
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
||||
|
|
Loading…
Reference in New Issue