diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index a4541bc51..425467ace 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -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 #--------------------------------------------------------------- diff --git a/lib/vagrant/ui.rb b/lib/vagrant/ui.rb index bf8e56358..03e195af1 100644 --- a/lib/vagrant/ui.rb +++ b/lib/vagrant/ui.rb @@ -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