Skip to content

Commit 7921de2

Browse files
authored
Fix DepErrors test
This was likely harmlessly causing `go get` reruns, since most (all?) real dependency errors cause `go list` to exit with a nonzero return code in any case.
1 parent 295152c commit 7921de2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/extractor/util/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func GetPkgDir(pkgpath string, flags ...string) string {
170170
// DepErrors checks there are any errors resolving dependencies for `pkgpath`. It passes the `go
171171
// list` command the flags specified by `flags`.
172172
func DepErrors(pkgpath string, flags ...string) bool {
173-
out, err := runGoList("{{if .DepsErrors}}{{else}}error{{end}}", []string{pkgpath}, flags...)
173+
out, err := runGoList("{{if .DepsErrors}}error{{else}}{{end}}", []string{pkgpath}, flags...)
174174
if err != nil {
175175
// if go list failed, assume dependencies are broken
176176
return false

0 commit comments

Comments
 (0)