diff --git a/version.txt b/version.txt index 3b34d22..804a616 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v1.7.2 +v1.8.0 diff --git a/version/version.go b/version/version.go index b410def..159a59d 100644 --- a/version/version.go +++ b/version/version.go @@ -63,13 +63,15 @@ func isUpdateRequired(current string, latest string) bool { } func getLatestVersion() (string, error) { + goproxy := "https://proxy.golang.org" cmd := exec.Command("go", "env", "GOPROXY") output, err := cmd.Output() if err != nil { - return "", err + fmt.Printf("failed to get GOPROXY: %v\n", err) + } else { + goproxy = strings.TrimSpace(string(output)) } - goproxy := strings.TrimSpace(string(output)) if goproxy == "" { goproxy = "https://proxy.golang.org" }