Skip to content

Commit

Permalink
fix GOMOD env fetch bug (zeromicro#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
miaogaolin authored Sep 9, 2020
1 parent 3a9b9ce commit 5299055
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/goctl/util/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package project

import (
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5299055

Please sign in to comment.