add spin stop in WarningT output

pull/10134/head
alonyb 2021-01-12 21:33:44 -05:00
parent a08f6e946f
commit 44b453019e
1 changed files with 4 additions and 0 deletions

View File

@ -208,6 +208,10 @@ func FatalT(format string, a ...V) {
// WarningT is a shortcut for writing a templated warning message to stderr
func WarningT(format string, a ...V) {
if JSON {
// if spin is active from a previous step, it will stop spinner displaying
if spin.Active() {
spin.Stop()
}
st, _ := stylized(style.Warning, useColor, format, a...)
register.PrintWarning(st)
return