Skip to content

Commit

Permalink
cmd/evm: print collection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lightclient committed Oct 29, 2024
1 parent eaed890 commit b37356f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,18 @@ func tracerFromFlags(ctx *cli.Context) *tracing.Hooks {
// extension.
func collectJSONFiles(path string) []string {
var out []string
filepath.Walk(path, func(path string, info fs.FileInfo, err error) error {
err := filepath.Walk(path, func(path string, info fs.FileInfo, err error) error {
if err != nil {
return err
}
if !info.IsDir() && filepath.Ext(info.Name()) == ".json" {
out = append(out, path)
}
return nil
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
return out
}

Expand Down

0 comments on commit b37356f

Please sign in to comment.