core: HandleBox keeps the same machine instance

This commit is contained in:
Mitchell Hashimoto 2014-02-11 16:05:26 -08:00
parent c280af0b9c
commit 06a7c88316
2 changed files with 6 additions and 5 deletions

View File

@ -45,11 +45,12 @@ module Vagrant
if box_updated
# Reload the environment and set the VM to be the new loaded VM.
old_machine = env[:machine]
env[:machine] = machine.vagrantfile.machine(
new_machine = machine.vagrantfile.machine(
machine.name, machine.provider_name,
machine.env.boxes, machine.data_dir, machine.env)
env[:machine].ui = old_machine.ui
env[:machine].box = new_machine.box
env[:machine].config = new_machine.config
env[:machine].provider_config = new_machine.provider_config
end
@app.call(env)

View File

@ -15,7 +15,7 @@ module Vagrant
# Configuration for the machine.
#
# @return [Object]
attr_reader :config
attr_accessor :config
# Directory where machine-specific data can be stored.
#
@ -47,7 +47,7 @@ module Vagrant
# The provider-specific configuration for this machine.
#
# @return [Object]
attr_reader :provider_config
attr_accessor :provider_config
# The name of the provider.
#