From 57070229516bb186b6ff887cb3c900e326ecd467 Mon Sep 17 00:00:00 2001 From: Tobias Theel Date: Fri, 19 Mar 2021 16:34:20 +0100 Subject: [PATCH] add goroot for snap installs --- goenv/goenv.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/goenv/goenv.go b/goenv/goenv.go index 9db71552..3f1352a7 100644 --- a/goenv/goenv.go +++ b/goenv/goenv.go @@ -171,8 +171,9 @@ func getGoroot() string { switch runtime.GOOS { case "linux": candidates = []string{ - "/usr/local/go", // manually installed - "/usr/lib/go", // from the distribution + "/usr/local/go", // manually installed + "/usr/lib/go", // from the distribution + "/snap/go/current/", // installed using snap } case "darwin": candidates = []string{