Skip to content

Commit

Permalink
Enforce module-mode in vendored projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Helcaraxan authored and Duco van Amstel committed Jul 20, 2021
1 parent f06799b commit 97a9742
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/depgraph/deps_pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (g *DepGraph) retrieveTransitiveImports(log *logger.Logger, pkgs []string)
}

func (g *DepGraph) retrievePackageInfo(log *logger.Logger, pkgs []string) (imports []string, err error) {
stdout, _, err := util.RunCommand(log, g.Main.Info.Dir, "go", append([]string{"list", "-json"}, pkgs...)...)
stdout, _, err := util.RunCommand(log, g.Main.Info.Dir, "go", append([]string{"list", "-json", "-mod=mod"}, pkgs...)...)
if err != nil {
log.Error("Failed to list imports for packages.", zap.Strings("packages", pkgs), zap.Error(err))
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/modules/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func retrieveModuleInformation(
}

log.Debug("Retrieving module information via 'go list'")
goListArgs := append([]string{"list", "-json", "-m"}, extraGoListArgs...)
goListArgs := append([]string{"list", "-json", "-m", "-mod=mod"}, extraGoListArgs...)
if targetModule == "" {
targetModule = "all"
}
Expand Down

0 comments on commit 97a9742

Please sign in to comment.