aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTobias Theel <[email protected]>2021-03-19 16:34:20 +0100
committerRon Evans <[email protected]>2021-04-15 17:34:21 +0200
commit57070229516bb186b6ff887cb3c900e326ecd467 (patch)
tree7d091c7f48ba39cdc7c124721442f82f0e47972c
parentbd212cc000a445da9c67484f5a101fa6df2fd5b3 (diff)
downloadtinygo-57070229516bb186b6ff887cb3c900e326ecd467.tar.gz
tinygo-57070229516bb186b6ff887cb3c900e326ecd467.zip
add goroot for snap installs
-rw-r--r--goenv/goenv.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/goenv/goenv.go b/goenv/goenv.go
index 9db715528..3f1352a78 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{