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 committed May 22, 2019
1 parent 1976457 commit 0d43923
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 0d43923

Please sign in to comment.