From fbeb99ee8386d892691ef65c19da55b094b09a79 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 11 Oct 2014 17:40:28 -0700 Subject: [PATCH] command: make sure the output has a line from a provisioner to output --- command/hook_ui.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/hook_ui.go b/command/hook_ui.go index 9c8603698b..059472c117 100644 --- a/command/hook_ui.go +++ b/command/hook_ui.go @@ -177,7 +177,9 @@ func (h *UiHook) ProvisionOutput( s := bufio.NewScanner(strings.NewReader(msg)) s.Split(scanLines) for s.Scan() { - buf.WriteString(fmt.Sprintf("%s%s\n", prefix, s.Text())) + if line := strings.TrimSpace(s.Text()); line != "" { + buf.WriteString(fmt.Sprintf("%s%s\n", prefix, line)) + } } h.ui.Output(strings.TrimSpace(buf.String()))