From eab781794e6a00e5b17e0376dd0bf8f2810d3305 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 27 Mar 2017 20:35:54 +1300 Subject: [PATCH] fix zero-value for maxhistorylines actually meaning zero history lines --- Task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Task.go b/Task.go index 5195182..e599c58 100644 --- a/Task.go +++ b/Task.go @@ -87,7 +87,7 @@ func (this *App) LaunchTask(workDir string, params []string) (taskRef string, er task := this.tasks[ref] 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:] } this.tasks[ref] = task