mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
fix GOMOD env fetch bug (#55)
This commit is contained in:
parent
3a9b9ceace
commit
52990550fb
@ -2,6 +2,7 @@ package project
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
@ -62,6 +63,9 @@ func Prepare(projectDir string, checkGrpcEnv bool) (*Project, error) {
|
||||
return nil, err
|
||||
}
|
||||
goMod = strings.TrimSpace(ret)
|
||||
if goMod == os.DevNull {
|
||||
goMod = ""
|
||||
}
|
||||
|
||||
ret, err = execx.Run(constGoPath, "")
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user