Skip to content

Commit 11e3a08

Browse files
committed
Go: Check for modules.txt or glide.yaml to exclude vendor dirs
1 parent fe4ee54 commit 11e3a08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

go/extractor/util/util.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -306,5 +306,6 @@ func fileExists(path string) bool {
306306
// Decides if `dirPath` is a vendor directory by testing whether it is called `vendor`
307307
// and contains a `modules.txt` file.
308308
func IsGolangVendorDirectory(dirPath string) bool {
309-
return filepath.Base(dirPath) == "vendor" && fileExists(filepath.Join(dirPath, "modules.txt"))
309+
return filepath.Base(dirPath) == "vendor" &&
310+
(fileExists(filepath.Join(dirPath, "modules.txt")) || fileExists(filepath.Join(dirPath, "../glide.yaml")))
310311
}

0 commit comments

Comments
 (0)