From 376eb0b327273ca9c6e3b573d84bbda6c4d51fa2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 8 Apr 2013 12:38:15 -0700 Subject: [PATCH] UI on Machine --- lib/vagrant/machine.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/machine.rb b/lib/vagrant/machine.rb index 47b23d202..b569d4f9e 100644 --- a/lib/vagrant/machine.rb +++ b/lib/vagrant/machine.rb @@ -57,6 +57,11 @@ module Vagrant # @return [Hash] attr_reader :provider_options + # The UI for outputting in the scope of this machine. + # + # @return [UI] + attr_reader :ui + # Initialize a new machine. # # @param [String] name Name of the virtual machine. @@ -91,6 +96,7 @@ module Vagrant @provider_config = provider_config @provider_name = provider_name @provider_options = provider_options + @ui = @env.ui.scope(@name) # Read the ID, which is usually in local storage @id = nil @@ -136,7 +142,7 @@ module Vagrant :action_name => "machine_action_#{name}".to_sym, :machine => self, :machine_action => name, - :ui => @env.ui.scope(@name) + :ui => @ui }.merge(extra_env || {}) @env.action_runner.run(callable, env) end