mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Prevent warnings from showing in individual commands when format is not table, in addition to the existing hiding of higher-level deprecation warnings
This commit is contained in:
@@ -217,9 +217,11 @@ func (c *OperatorGenerateRootCommand) Run(args []string) int {
|
||||
// TODO: remove in 0.9.0
|
||||
switch {
|
||||
case c.flagGenOTP:
|
||||
c.UI.Warn(wrapAtLength(
|
||||
"The -gen-otp flag is deprecated. Please use the -generate-otp flag " +
|
||||
"instead."))
|
||||
if Format(c.UI) == "table" {
|
||||
c.UI.Warn(wrapAtLength(
|
||||
"WARNING! The -gen-otp flag is deprecated. Please use the -generate-otp flag " +
|
||||
"instead."))
|
||||
}
|
||||
c.flagGenerateOTP = c.flagGenOTP
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user