Skip to content

Commit

Permalink
fix: missing stdout on dry run/apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Stough committed Jul 23, 2021
1 parent aec092a commit 9d77da9
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions kotsadm/operator/pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,20 +235,7 @@ func (c *Client) registerHandlers(socketClient *socket.Client) error {
var helmResult *commandResult
var deployError, helmError error
defer func() {
var dryRunResult, applyResult *commandResult

// only send results if we have an error
if deployRes.dryRunResult.hasErr {
dryRunResult = &deployRes.dryRunResult
}
if deployRes.applyResult.hasErr {
applyResult = &deployRes.applyResult
}
if helmResult != nil && !helmResult.hasErr {
helmResult = &commandResult{}
}

err := c.sendResult(args, dryRunResult, applyResult, helmResult)
err := c.sendResult(args, &deployRes.dryRunResult, &deployRes.applyResult, helmResult)
if err != nil {
log.Printf("failed to report result: %v", err)
}
Expand Down

0 comments on commit 9d77da9

Please sign in to comment.