Skip to content

Commit

Permalink
Audit listing with format json returns json, not a string
Browse files Browse the repository at this point in the history
Fixes #6775
  • Loading branch information
jefferai authored and michelvocks committed May 30, 2019
1 parent 1d56d0d commit d901cef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions command/audit_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ func (c *AuditListCommand) Run(args []string) int {
return 2
}

if len(audits) == 0 {
c.UI.Output(fmt.Sprintf("No audit devices are enabled."))
return 0
}

switch Format(c.UI) {
case "table":
if len(audits) == 0 {
c.UI.Output(fmt.Sprintf("No audit devices are enabled."))
return 0
}

if c.flagDetailed {
c.UI.Output(tableOutput(c.detailedAudits(audits), nil))
return 0
Expand Down

0 comments on commit d901cef

Please sign in to comment.