core: HandleBox keeps the same machine instance
This commit is contained in:
parent
c280af0b9c
commit
06a7c88316
|
@ -45,11 +45,12 @@ module Vagrant
|
||||||
|
|
||||||
if box_updated
|
if box_updated
|
||||||
# Reload the environment and set the VM to be the new loaded VM.
|
# Reload the environment and set the VM to be the new loaded VM.
|
||||||
old_machine = env[:machine]
|
new_machine = machine.vagrantfile.machine(
|
||||||
env[:machine] = machine.vagrantfile.machine(
|
|
||||||
machine.name, machine.provider_name,
|
machine.name, machine.provider_name,
|
||||||
machine.env.boxes, machine.data_dir, machine.env)
|
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
|
end
|
||||||
|
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
|
|
|
@ -15,7 +15,7 @@ module Vagrant
|
||||||
# Configuration for the machine.
|
# Configuration for the machine.
|
||||||
#
|
#
|
||||||
# @return [Object]
|
# @return [Object]
|
||||||
attr_reader :config
|
attr_accessor :config
|
||||||
|
|
||||||
# Directory where machine-specific data can be stored.
|
# Directory where machine-specific data can be stored.
|
||||||
#
|
#
|
||||||
|
@ -47,7 +47,7 @@ module Vagrant
|
||||||
# The provider-specific configuration for this machine.
|
# The provider-specific configuration for this machine.
|
||||||
#
|
#
|
||||||
# @return [Object]
|
# @return [Object]
|
||||||
attr_reader :provider_config
|
attr_accessor :provider_config
|
||||||
|
|
||||||
# The name of the provider.
|
# The name of the provider.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue