From ebfad05e3f69027e554adce671296cf7902a968d Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Thu, 20 Jun 2024 17:42:01 +0800 Subject: [PATCH] build: remove check for default GOPATH and GOROOT being identical --- internal/build/build.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/build/build.go b/internal/build/build.go index faef670c..6c0cdce6 100644 --- a/internal/build/build.go +++ b/internal/build/build.go @@ -18,7 +18,6 @@ package build import ( "archive/zip" - "errors" "fmt" "go/constant" "go/token" @@ -93,11 +92,7 @@ func envGOPATH() (string, error) { if err != nil { return "", err } - gopath := filepath.Join(home, "go") - if filepath.Clean(gopath) == filepath.Clean(runtime.GOROOT()) { - return "", errors.New("cannot set GOROOT as GOPATH") - } - return gopath, nil + return filepath.Join(home, "go"), nil } func DefaultAppExt() string {