fix zero-value for maxhistorylines actually meaning zero history lines
This commit is contained in:
parent
f7c70603f2
commit
eab781794e
2
Task.go
2
Task.go
@ -87,7 +87,7 @@ func (this *App) LaunchTask(workDir string, params []string) (taskRef string, er
|
|||||||
|
|
||||||
task := this.tasks[ref]
|
task := this.tasks[ref]
|
||||||
task.output = append(task.output, OutputLine{isError: isError, text: text})
|
task.output = append(task.output, OutputLine{isError: isError, text: text})
|
||||||
if len(task.output) > 2*this.cfg.MaxHistoryLines {
|
if this.cfg.MaxHistoryLines > 0 && len(task.output) > 2*this.cfg.MaxHistoryLines {
|
||||||
task.output = task.output[this.cfg.MaxHistoryLines:]
|
task.output = task.output[this.cfg.MaxHistoryLines:]
|
||||||
}
|
}
|
||||||
this.tasks[ref] = task
|
this.tasks[ref] = task
|
||||||
|
Loading…
Reference in New Issue
Block a user