1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

should not surpress empty lines expect on last line

This commit is contained in:
jaedle
2019-02-24 11:58:44 +01:00
parent 399a2b38f3
commit 1ac6f17e6a
3 changed files with 16 additions and 2 deletions

View File

@@ -88,8 +88,9 @@ func (e *Executor) displayTaskDetails(task string) {
return
}
lines := strings.Split(s, "\n")
for _, line := range lines {
if line != "" {
for i, line := range lines {
notLastLine := i+1 < len(lines)
if notLastLine || line != "" {
e.Logger.Outf(line)
}
}