deduplicate loglines that stream both to ui ERROR call and to streaming logs when PACKER_LOG=1

This commit is contained in:
Megan Marsh 2019-07-25 16:33:02 -07:00
parent 54034689ef
commit 9912e569e1
1 changed files with 3 additions and 0 deletions

3
log.go
View File

@ -35,6 +35,9 @@ func logOutput() (logOutput io.Writer, err error) {
if strings.Contains(scanner.Text(), "ui:") {
continue
}
if strings.Contains(scanner.Text(), "ui error:") {
continue
}
os.Stderr.WriteString(fmt.Sprint(scanner.Text() + "\n"))
}
}(scanner)