mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
binary-update: Do not fetch update info for minio binary compiled from source.
fixes #2494
This commit is contained in:
committed by
Harshavardhana
parent
b4e4846e9f
commit
81d8263ae2
+8
-5
@@ -20,6 +20,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/console"
|
||||
@@ -180,14 +181,16 @@ func Main() {
|
||||
|
||||
// Do not print update messages, if quiet flag is set.
|
||||
if !globalQuiet {
|
||||
// Do not print any errors in release update function.
|
||||
noError := true
|
||||
updateMsg := getReleaseUpdate(minioUpdateStableURL, noError)
|
||||
if updateMsg.Update {
|
||||
if strings.HasPrefix(Version, "RELEASE.") {
|
||||
updateMsg, _, err := getReleaseUpdate(minioUpdateStableURL)
|
||||
if err != nil {
|
||||
// Ignore any errors during getReleaseUpdate() because
|
||||
// the internet might not be available.
|
||||
return nil
|
||||
}
|
||||
console.Println(updateMsg)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user