mirror of
https://gitea.com/gitea/act_runner.git
synced 2024-11-10 04:37:22 +01:00
Trim newline in log message (#6)
Co-authored-by: Jason Song <i@wolfogre.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/6
This commit is contained in:
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
Block a user