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() {
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 {

View File

@ -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)