mirror of https://code.forgejo.org/forgejo/runner
Trim newline in log message (#6)
Co-authored-by: Jason Song <i@wolfogre.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/6pull/2/head
parent
0f97dd873a
commit
0cbdbd36b6
|
@ -285,7 +285,7 @@ func (r *Reporter) parseResult(result interface{}) (runnerv1.Result, bool) {
|
|||
}
|
||||
|
||||
func (r *Reporter) parseLogRow(entry *log.Entry) *runnerv1.LogRow {
|
||||
content := strings.TrimSuffix(entry.Message, "\r\n")
|
||||
content := strings.TrimRightFunc(entry.Message, func(r rune) bool { return r == '\r' || r == '\n' })
|
||||
content = r.logReplacer.Replace(content)
|
||||
return &runnerv1.LogRow{
|
||||
Time: timestamppb.New(entry.Time),
|
||||
|
|
Loading…
Reference in New Issue