Skip to content

Commit

Permalink
Fixes CheckWhenObserve policy (#262)
Browse files Browse the repository at this point in the history
Closes #261

Signed-off-by: Patryk Duński <patryk.dunski@marcel.pl>
  • Loading branch information
mrdunski authored Jan 8, 2024
1 parent ac49920 commit 5e0d992
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/ansibleRun/ansibleRun.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ func (c *external) Observe(ctx context.Context, mg resource.Managed) (managed.Ex
if err != nil {
return managed.ExternalObservation{}, err
}
res, err := results.ParseJSONResultsStream(stdoutBuf)
if err != nil {
if err = dc.Wait(); err != nil {
return managed.ExternalObservation{}, err
}
if err = dc.Wait(); err != nil {
res, err := results.ParseJSONResultsStream(stdoutBuf)
if err != nil {
return managed.ExternalObservation{}, err
}
changes := ansible.Diff(res)
Expand Down

0 comments on commit 5e0d992

Please sign in to comment.