packer/plugin: trim whitespace on right of log data from plugin
This commit is contained in:
parent
f2f69e6f7b
commit
00338a0b85
|
@ -16,6 +16,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
// This is a slice of the "managed" clients which are cleaned up when
|
||||
|
@ -306,8 +307,10 @@ func (c *Client) logStderr(r io.Reader) {
|
|||
for {
|
||||
line, err := bufR.ReadString('\n')
|
||||
if line != "" {
|
||||
log.Printf("%s: %s", c.config.Cmd.Path, line)
|
||||
c.config.Stderr.Write([]byte(line))
|
||||
|
||||
line = strings.TrimRightFunc(line, unicode.IsSpace)
|
||||
log.Printf("%s: %s", c.config.Cmd.Path, line)
|
||||
}
|
||||
|
||||
if err == io.EOF {
|
||||
|
|
Loading…
Reference in New Issue