Commit e8b7c100 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #2169 from cbednarski/b-communicator-test-failure

Prevent select from spewing garbage to the terminal
parents 3a066d53 408250ec
package packer
import (
"github.com/mitchellh/iochan"
"io"
"os"
"strings"
"sync"
"github.com/mitchellh/iochan"
)
// RemoteCmd represents a remote command being prepared or run.
......@@ -132,9 +133,13 @@ OutputLoop:
for {
select {
case output := <-stderrCh:
ui.Message(r.cleanOutputLine(output))
if output != "" {
ui.Message(r.cleanOutputLine(output))
}
case output := <-stdoutCh:
ui.Message(r.cleanOutputLine(output))
if output != "" {
ui.Message(r.cleanOutputLine(output))
}
case <-exitCh:
break OutputLoop
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment