Skip to content

Commit 2bc9fc3

Browse files
authored
Fix version check on WSL (#47)
* fix version check on wsl * debug logging for proxy errors * version check command update
1 parent 63e2352 commit 2bc9fc3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.7.2
1+
v1.8.0

version/version.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ func isUpdateRequired(current string, latest string) bool {
6363
}
6464

6565
func getLatestVersion() (string, error) {
66+
goproxy := "https://proxy.golang.org"
6667
cmd := exec.Command("go", "env", "GOPROXY")
6768
output, err := cmd.Output()
6869
if err != nil {
69-
return "", err
70+
fmt.Printf("failed to get GOPROXY: %v\n", err)
71+
} else {
72+
goproxy = strings.TrimSpace(string(output))
7073
}
7174

72-
goproxy := strings.TrimSpace(string(output))
7375
if goproxy == "" {
7476
goproxy = "https://proxy.golang.org"
7577
}

0 commit comments

Comments
 (0)