cli: fix json output for namespace list command (#7705)

This commit is contained in:
Calvin Leung Huang 2019-10-21 13:38:37 -07:00 committed by GitHub
parent 39247a5a21
commit da984b2d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ func (c *NamespaceListCommand) Run(args []string) int {
_, ok := extractListData(secret)
if Format(c.UI) != "table" {
if secret == nil || secret.Data != nil || !ok {
if secret == nil || secret.Data == nil || !ok {
OutputData(c.UI, map[string]interface{}{})
return 2
}