Skip to content

Commit

Permalink
improves ux: issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
emirozer committed Aug 29, 2019
1 parent 1b7e171 commit ac5e3e5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pkg/plugin/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,17 @@ func (o *DoctorOptions) Run() error {
// triage jobs end

// yaml outputter
log.Info("Triage report coming up in yaml format:")
d, err := yaml.Marshal(&report)
if err != nil {
log.Fatalf("error: %v", err)
if len(report["TriageReport"]) > 0 {
log.Info("Triage report coming up in yaml format:")
d, err := yaml.Marshal(&report)
if err != nil {
log.Fatalf("error: %v", err)
}
fmt.Println("\n---\n", string(d))
} else {
log.Info("Triage finished, cluster all clear, no anomalies detected!")
}
fmt.Println("\n---\n", string(d))

return nil

}

0 comments on commit ac5e3e5

Please sign in to comment.