improve logs, fix banner formatting (#14456)

This commit is contained in:
Harshavardhana
2022-03-03 13:21:16 -08:00
committed by GitHub
parent b48f719b8e
commit 0e3bafcc54
22 changed files with 73 additions and 100 deletions

View File

@@ -41,6 +41,10 @@ func prepareUpdateMessage(downloadURL string, older time.Duration) string {
t := time.Time{}
newerThan := humanize.RelTime(t, t.Add(older), "ago", "")
if globalCLIContext.JSON {
return fmt.Sprintf("You are running an older version of MinIO released %s, update: %s", newerThan, downloadURL)
}
// Return the nicely colored and formatted update message.
return colorizeUpdateMessage(downloadURL, newerThan)
}