Skip to content

Commit

Permalink
Compare startline and endline to determine when to add a newline
Browse files Browse the repository at this point in the history
  • Loading branch information
dehort committed Dec 9, 2024
1 parent 0e71e29 commit 06f7c41
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/common/ansible/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ func GetStdout(events []messageModel.PlaybookRunResponseMessageYamlEventsElem, h
continue
}

if event.Stdout != nil && len(*event.Stdout) > 0 {
result += *event.Stdout + "\n"
if event.Stdout != nil {
result += *event.Stdout
if event.EndLine > event.StartLine {
result += "\n"
}
}
}

Expand Down

0 comments on commit 06f7c41

Please sign in to comment.