Skip to content

Commit

Permalink
🐛 when go-list return an error, show exactly on which path it occurre…
Browse files Browse the repository at this point in the history
…d. This is useful to debug issues when having sub-packages
  • Loading branch information
AlmogBaku committed Sep 18, 2022
1 parent 24d788a commit 88cee6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func LoadRootsWithConfig(cfg *packages.Config, roots ...string) ([]*Package, err
loadPackages := func(roots ...string) ([]*Package, error) {
rawPkgs, err := packages.Load(l.cfg, roots...)
if err != nil {
return nil, err
return nil, fmt.Errorf("error in %s: %w", l.cfg.Dir, err)
}
var pkgs []*Package
for _, rp := range rawPkgs {
Expand Down

0 comments on commit 88cee6f

Please sign in to comment.