From 535e72204c19f02be9a19a6fedb6e9372cec24bd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 23 Jan 2011 12:06:09 -0800 Subject: [PATCH] Shell provisioner STDOUT/STDERR to console --- lib/vagrant/provisioners/shell.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/provisioners/shell.rb b/lib/vagrant/provisioners/shell.rb index 43f3d1660..04723ca0a 100644 --- a/lib/vagrant/provisioners/shell.rb +++ b/lib/vagrant/provisioners/shell.rb @@ -37,7 +37,14 @@ module Vagrant # Execute it with sudo vm.ssh.execute do |ssh| ssh.sudo!("chmod +x #{config.upload_path}") - ssh.sudo!(config.upload_path) + + ssh.sudo!(config.upload_path) do |ch, type, data| + if type == :exit_status + ssh.check_exit_status(data, config.upload_path) + else + env.ui.info(data) + end + end end end end