From 3b75652256657355ca90c65279fda32228d92a34 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 1 Feb 2013 10:56:00 -0800 Subject: [PATCH] Always log stdout/stderr for SSH --- plugins/communicators/ssh/communicator.rb | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb index 846f32764..289df8306 100644 --- a/plugins/communicators/ssh/communicator.rb +++ b/plugins/communicators/ssh/communicator.rb @@ -221,21 +221,17 @@ module VagrantPlugins ch.exec(shell) do |ch2, _| # Setup the channel callbacks so we can get data and exit status ch2.on_data do |ch3, data| - if block_given? - # Filter out the clear screen command - data = remove_ansi_escape_codes(data) - @logger.debug("stdout: #{data}") - yield :stdout, data - end + # Filter out the clear screen command + data = remove_ansi_escape_codes(data) + @logger.debug("stdout: #{data}") + yield :stdout, data if block_given? end ch2.on_extended_data do |ch3, type, data| - if block_given? - # Filter out the clear screen command - data = remove_ansi_escape_codes(data) - @logger.debug("stderr: #{data}") - yield :stderr, data - end + # Filter out the clear screen command + data = remove_ansi_escape_codes(data) + @logger.debug("stderr: #{data}") + yield :stderr, data if block_given? end ch2.on_request("exit-status") do |ch3, data|