Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/internal/server/info_module.go b/internal/server/info_module.go 2index d2513bd..ad2921e 100644 3--- a/internal/server/info_module.go 4+++ b/internal/server/info_module.go 5@@ -8,6 +8,7 @@ import ( 6 "io/ioutil" 7 "log" 8 "os" 9+ "os/exec" 10 "path/filepath" 11 "regexp" 12 "strings" 13@@ -756,7 +757,11 @@ func findGoToolchainVersionFromGoRoot(goroot string) (string, error) { 14 versionData, err = ioutil.ReadFile(filepath.Join(goroot, "VERSION.cache")) 15 } 16 if err != nil { 17- return "", fmt.Errorf("failed to get Go toolchain version in GOROOT (%s)", goroot) 18+ cmd := exec.Command("go", "env", "GOVERSION") 19+ versionData, err = cmd.Output() 20+ if err != nil { 21+ return "", fmt.Errorf("failed to get Go toolchain version in GOROOT (%s)", goroot) 22+ } 23 } 24 matches := findGoVersionRegexp.FindSubmatch(versionData) 25 if len(matches) >= 1 {