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