Skip to content

Commit bc78941

Browse files
authored
Update gomodules.go
change err name
1 parent c550c34 commit bc78941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/build/gomodules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (b *Build) cpGoModulesProject() {
5454
// 'replace github.com/qiniu/bar => /path/to/aa/bb/home/foo/bar'
5555
func (b *Build) updateGoModFile() (updateFlag bool, newModFile []byte, err error) {
5656
// use buildflags `-mod=vendor` and exist vendor folder, should not update go.mod
57-
if _, err := os.Stat(path.Join(b.ModRoot, "vendor")); err == nil && strings.Contains(b.BuildFlags, "-mod=vendor") {
57+
if _, err1 := os.Stat(path.Join(b.ModRoot, "vendor")); err1 == nil && strings.Contains(b.BuildFlags, "-mod=vendor") {
5858
return
5959
}
6060
tempModfile := filepath.Join(b.TmpDir, "go.mod")

0 commit comments

Comments
 (0)