Show error if output format is invalid
Rather than silently using table as a fallback.
This commit is contained in:
parent
de0ddf4912
commit
b00b476c7a
|
@ -21,9 +21,10 @@ func OutputSecret(ui cli.Ui, format string, secret *api.Secret) int {
|
|||
case "yaml":
|
||||
return outputFormatYAML(ui, secret)
|
||||
case "table":
|
||||
fallthrough
|
||||
default:
|
||||
return outputFormatTable(ui, secret, true)
|
||||
default:
|
||||
ui.Error(fmt.Sprintf("Invalid output format: %s", format))
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue