Skip to content

Commit

Permalink
gazelle: add -e flag for go list 1.16 (#1019)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
axelberardino authored Mar 30, 2021
1 parent 939ff50 commit c78468a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion language/go/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c78468a

Please sign in to comment.