Skip to content

Commit

Permalink
Fix version check on WSL (#47)
Browse files Browse the repository at this point in the history
* fix version check on wsl

* debug logging for proxy errors

* version check command update
  • Loading branch information
hbeckmann committed Aug 22, 2024
1 parent 63e2352 commit 2bc9fc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.7.2
v1.8.0
6 changes: 4 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 2bc9fc3

Please # to comment.