Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Commit

Permalink
Ignore the GOPATH warning if Makefile exists
Browse files Browse the repository at this point in the history
For example not to confuse Hellogopher users
  • Loading branch information
FiloSottile committed Nov 17, 2016
1 parent 1f87bb3 commit 7b02521
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Expand Up @@ -106,7 +106,9 @@ func init() {
importPath = filepath.ToSlash(strings.TrimPrefix(wd, p))
break
}
if build.Default.GOPATH == "" || len(srcTree) == pathMismatch {
log.Println("WARNING: for go vendoring to work your project needs to be somewhere under $GOPATH/src/")
if _, err := os.Stat(filepath.Join(wd, "Makefile")); os.IsNotExist(err) {
if build.Default.GOPATH == "" || len(srcTree) == pathMismatch {
log.Println("WARNING: for go vendoring to work your project needs to be somewhere under $GOPATH/src/")
}
}
}

0 comments on commit 7b02521

Please sign in to comment.