Skip to content

Commit

Permalink
Check error in call to FormatConditionResponse() (#43)
Browse files Browse the repository at this point in the history
In case there are no errors, we print only the formatted response and
not both the formatted string and nil
  • Loading branch information
diogomatsubara authored Sep 13, 2023
1 parent 3d7165d commit 13eebf0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/install/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ func statusCheck(ctx context.Context) {
log.Fatalf("querying server conditions: %s", err.Error())
}

fmt.Println(mctl.FormatConditionResponse(resp))
s, err := mctl.FormatConditionResponse(resp)
if err != nil {
log.Fatalf("error formating condition response: %s", err.Error())
}

fmt.Println(s)
}

func init() {
Expand Down

0 comments on commit 13eebf0

Please sign in to comment.