From c78468ac6ee5ac2ad82b1f2822242821700ff7ed Mon Sep 17 00:00:00 2001 From: Axel Berardino Date: Tue, 30 Mar 2021 22:45:17 +0200 Subject: [PATCH] gazelle: add -e flag for go list 1.16 (#1019) Starting from version 1.16, go list doesn't list all modules if sum is missing. The -e flag is required to get back the old behavior. --- language/go/modules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/go/modules.go b/language/go/modules.go index 545888c48..dd5e7dd29 100644 --- a/language/go/modules.go +++ b/language/go/modules.go @@ -151,7 +151,7 @@ func importReposFromModules(args language.ImportReposArgs) language.ImportReposR // goListModules invokes "go list" in a directory containing a go.mod file. var goListModules = func(dir string) ([]byte, error) { - return runGoCommandForOutput(dir, "list", "-mod=readonly", "-m", "-json", "all") + return runGoCommandForOutput(dir, "list", "-mod=readonly", "-e", "-m", "-json", "all") } // goModDownload invokes "go mod download" in a directory containing a