errors logs fixed

This commit is contained in:
alessio 2017-08-08 23:56:19 +02:00
parent 0ca3917686
commit 5170075b7d
2 changed files with 4 additions and 7 deletions

View File

@ -85,7 +85,7 @@ func (p *Project) goRun(channel chan bool, runner chan bool, wr *sync.WaitGroup)
for output.Scan() { for output.Scan() {
text := output.Text() text := output.Text()
msg := fmt.Sprintln(p.pname(p.Name, 3), ":", style.Blue.Regular(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"} out := BufferOut{Time: time.Now(), Text: text, Type: "Go Run"}
p.print("error", out, msg, "") p.print("error", out, msg, "")
} else { } else {

View File

@ -396,9 +396,6 @@ func (p *Project) print(t string, o BufferOut, msg string, stream string) {
p.Fatal(err, "") p.Fatal(err, "")
} }
} }
if msg != "" {
log.Print(msg)
}
case "error": case "error":
p.Buffer.StdErr = append(p.Buffer.StdErr, o) p.Buffer.StdErr = append(p.Buffer.StdErr, o)
if p.Streams.FileErr { if p.Streams.FileErr {
@ -412,10 +409,10 @@ func (p *Project) print(t string, o BufferOut, msg string, stream string) {
p.Fatal(err, "") p.Fatal(err, "")
} }
} }
}
if msg != "" { if msg != "" {
log.Print(msg) log.Print(msg)
} }
}
if stream != "" { if stream != "" {
fmt.Print(stream) fmt.Print(stream)
} }