diff --git a/watcher/exec.go b/watcher/exec.go index 5746710..d619bc9 100644 --- a/watcher/exec.go +++ b/watcher/exec.go @@ -85,7 +85,7 @@ func (p *Project) goRun(channel chan bool, runner chan bool, wr *sync.WaitGroup) for output.Scan() { text := output.Text() msg := fmt.Sprintln(p.pname(p.Name, 3), ":", style.Blue.Regular(text)) - if isError && isErrorText(text) { + if isError && !isErrorText(text) { out := BufferOut{Time: time.Now(), Text: text, Type: "Go Run"} p.print("error", out, msg, "") } else { diff --git a/watcher/watcher.go b/watcher/watcher.go index 7c7276d..87ba22d 100644 --- a/watcher/watcher.go +++ b/watcher/watcher.go @@ -396,9 +396,6 @@ func (p *Project) print(t string, o BufferOut, msg string, stream string) { p.Fatal(err, "") } } - if msg != "" { - log.Print(msg) - } case "error": p.Buffer.StdErr = append(p.Buffer.StdErr, o) if p.Streams.FileErr { @@ -412,9 +409,9 @@ func (p *Project) print(t string, o BufferOut, msg string, stream string) { p.Fatal(err, "") } } - if msg != "" { - log.Print(msg) - } + } + if msg != "" { + log.Print(msg) } if stream != "" { fmt.Print(stream)