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
|
||||
# for talking with the outside world.
|
||||
def ui
|
||||
return parent.ui if parent
|
||||
@ui ||= UI.new(self)
|
||||
@ui ||= if parent
|
||||
result = parent.ui.clone
|
||||
result.env = self
|
||||
result
|
||||
else
|
||||
UI.new(self)
|
||||
end
|
||||
end
|
||||
|
||||
#---------------------------------------------------------------
|
||||
|
|
|
@ -5,7 +5,7 @@ module Vagrant
|
|||
# through a shell). They must respond to the typically logger methods
|
||||
# of `warn`, `error`, `info`, and `confirm`.
|
||||
class UI
|
||||
attr_reader :env
|
||||
attr_accessor :env
|
||||
|
||||
def initialize(env)
|
||||
@env = env
|
||||
|
|
Loading…
Reference in New Issue