Merge pull request #10134 from alonyb/w/fix-spinner

Add spinner stop in warn messages
pull/10141/head
Medya Ghazizadeh 2021-01-13 09:18:18 -08:00 committed by GitHub
commit da9e1819ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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