mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-22 14:28:00 +02:00
Skip counting log length when parseLogRow return nil (#176)
Fix:  Regression of #149, `LogLength` could be incorrect. It may be related to https://github.com/go-gitea/gitea/issues/24458 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/176 Reviewed-by: Zettat123 <zettat123@noreply.gitea.io> Reviewed-by: wxiaoguang <wxiaoguang@noreply.gitea.io>
This commit is contained in:
@ -139,11 +139,13 @@ func (r *Reporter) Fire(entry *log.Entry) error {
|
||||
}
|
||||
if v, ok := entry.Data["raw_output"]; ok {
|
||||
if rawOutput, ok := v.(bool); ok && rawOutput {
|
||||
if step.LogLength == 0 {
|
||||
step.LogIndex = int64(r.logOffset + len(r.logRows))
|
||||
if row := r.parseLogRow(entry); row != nil {
|
||||
if step.LogLength == 0 {
|
||||
step.LogIndex = int64(r.logOffset + len(r.logRows))
|
||||
}
|
||||
step.LogLength++
|
||||
r.logRows = append(r.logRows, row)
|
||||
}
|
||||
step.LogLength++
|
||||
r.logRows = appendIfNotNil(r.logRows, r.parseLogRow(entry))
|
||||
}
|
||||
} else if !r.duringSteps() {
|
||||
r.logRows = appendIfNotNil(r.logRows, r.parseLogRow(entry))
|
||||
|
Reference in New Issue
Block a user