binary-update: Do not fetch update info for minio binary compiled from source.

fixes #2494
This commit is contained in:
Krishna Srinivas
2016-08-19 20:39:05 +05:30
committed by Harshavardhana
parent b4e4846e9f
commit 81d8263ae2
2 changed files with 48 additions and 45 deletions
+8 -5
View File
@@ -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
}