diff --git a/.gitignore b/.gitignore index 9ef2197..cb30c58 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ test/tmp test/version_tmp tmp .vagrant +*.swo +*.swp diff --git a/lib/vagrant-host-shell/provisioner.rb b/lib/vagrant-host-shell/provisioner.rb index 06ecfe1..123cd4a 100644 --- a/lib/vagrant-host-shell/provisioner.rb +++ b/lib/vagrant-host-shell/provisioner.rb @@ -8,11 +8,19 @@ def provision :notify => [:stdout, :stderr], :workdir => config.cwd ) do |io_name, data| - @machine.env.ui.info "[#{io_name}] #{data}" + options = { + new_line: false, + prefix: false, + } + + color = io_name == :stdout ? :green : :red + options[:color] = color # if !config.keep_color + + @machine.env.ui.info(data, options) end - if config.abort_on_nonzero && !result.exit_code.zero? - raise VagrantPlugins::HostShell::Errors::NonZeroStatusError.new(config.inline, result.exit_code) + if config.abort_on_nonzero && !result.exit_code.zero? + raise VagrantPlugins::HostShell::Errors::NonZeroStatusError.new(config.inline, result.exit_code) end end diff --git a/lib/vagrant-host-shell/version.rb b/lib/vagrant-host-shell/version.rb index 77b8222..2cdbaec 100644 --- a/lib/vagrant-host-shell/version.rb +++ b/lib/vagrant-host-shell/version.rb @@ -1,5 +1,5 @@ module VagrantPlugins module HostShell - VERSION = '0.0.4' + VERSION = '0.0.5pre' end end