provisioner/shell: Trim whitespace on output

This commit is contained in:
Mitchell Hashimoto 2013-06-02 23:39:04 -07:00
parent 684df67ca6
commit fdda64f48e
1 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import (
"io" "io"
"log" "log"
"os" "os"
"strings"
"time" "time"
) )
@ -90,9 +91,9 @@ OutputLoop:
for { for {
select { select {
case output := <-stderrChan: case output := <-stderrChan:
ui.Say(output) ui.Say(strings.TrimSpace(output))
case output := <-stdoutChan: case output := <-stdoutChan:
ui.Say(output) ui.Say(strings.TrimSpace(output))
case exitStatus := <-exitChan: case exitStatus := <-exitChan:
log.Printf("shell provisioner exited with status %d", exitStatus) log.Printf("shell provisioner exited with status %d", exitStatus)
break OutputLoop break OutputLoop