first middleware, import, moved to rescue for cleanup

This commit is contained in:
John Bender 2010-07-29 20:40:35 -07:00
parent 3541b903d5
commit 99f7b62c83
1 changed files with 5 additions and 3 deletions

View File

@ -22,10 +22,12 @@ module Vagrant
end end
# Import completed successfully. Continue the chain # Import completed successfully. Continue the chain
@app.call(env) if !env.error? @app.call(env)
end
def rescue(env)
# Interrupted, destroy the VM # Interrupted, destroy the VM
env["actions"].run(:destroy) if env.interrupted? env["actions"].run(:destroy)
end end
end end
end end