Skip to content

Commit fbeb99e

Browse files
committed
command: make sure the output has a line from a provisioner to output
1 parent 8fc134c commit fbeb99e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎command/hook_ui.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ func (h *UiHook) ProvisionOutput(
177177
s := bufio.NewScanner(strings.NewReader(msg))
178178
s.Split(scanLines)
179179
for s.Scan() {
180-
buf.WriteString(fmt.Sprintf("%s%s\n", prefix, s.Text()))
180+
if line := strings.TrimSpace(s.Text()); line != "" {
181+
buf.WriteString(fmt.Sprintf("%s%s\n", prefix, line))
182+
}
181183
}
182184

183185
h.ui.Output(strings.TrimSpace(buf.String()))

0 commit comments

Comments
 (0)