Child UIs successfully set environment to themselves
This commit is contained in:
parent
5e0a7d946e
commit
b21fae99c5
|
@ -138,8 +138,13 @@ module Vagrant
|
||||||
# Returns the {UI} for the environment, which is responsible
|
# Returns the {UI} for the environment, which is responsible
|
||||||
# for talking with the outside world.
|
# for talking with the outside world.
|
||||||
def ui
|
def ui
|
||||||
return parent.ui if parent
|
@ui ||= if parent
|
||||||
@ui ||= UI.new(self)
|
result = parent.ui.clone
|
||||||
|
result.env = self
|
||||||
|
result
|
||||||
|
else
|
||||||
|
UI.new(self)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Vagrant
|
||||||
# through a shell). They must respond to the typically logger methods
|
# through a shell). They must respond to the typically logger methods
|
||||||
# of `warn`, `error`, `info`, and `confirm`.
|
# of `warn`, `error`, `info`, and `confirm`.
|
||||||
class UI
|
class UI
|
||||||
attr_reader :env
|
attr_accessor :env
|
||||||
|
|
||||||
def initialize(env)
|
def initialize(env)
|
||||||
@env = env
|
@env = env
|
||||||
|
|
Loading…
Reference in New Issue