Ignore the GOPATH warning if Makefile exists
For example not to confuse Hellogopher users
diff --git a/main.go b/main.go
index 56710f6..15d5bbe 100644
--- a/main.go
+++ b/main.go
@@ -106,7 +106,9 @@
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/")
+ }
}
}