Skip to content

Commit

Permalink
Add newline to each stdout line from ansible output
Browse files Browse the repository at this point in the history
  • Loading branch information
dehort committed Dec 6, 2024
1 parent 2e447b4 commit d3c1956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/common/ansible/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func GetStdout(events []messageModel.PlaybookRunResponseMessageYamlEventsElem, h
continue
}

if event.Stdout != nil {
result += *event.Stdout
if event.Stdout != nil && len(event.Stdout) > 0 {

Check failure on line 40 in internal/common/ansible/runner.go

View check run for this annotation

Red Hat Konflux / Red Hat Konflux / playbook-dispatcher-on-pull-request

internal/common/ansible/runner.go#L40

invalid argument: event.Stdout (variable of type *string) for len

Check failure on line 40 in internal/common/ansible/runner.go

View workflow job for this annotation

GitHub Actions / golang

invalid argument: event.Stdout (variable of type *string) for len

Check failure on line 40 in internal/common/ansible/runner.go

View workflow job for this annotation

GitHub Actions / lint

invalid argument: event.Stdout (variable of type *string) for len (typecheck)

Check failure on line 40 in internal/common/ansible/runner.go

View workflow job for this annotation

GitHub Actions / lint

invalid argument: event.Stdout (variable of type *string) for len) (typecheck)
result += *event.Stdout + "\n"
}
}

Expand Down

0 comments on commit d3c1956

Please sign in to comment.