diff --git a/go/cmd/internal/docgen/docgen.go b/go/cmd/internal/docgen/docgen.go index 13b55810a36..13da886b318 100644 --- a/go/cmd/internal/docgen/docgen.go +++ b/go/cmd/internal/docgen/docgen.go @@ -172,10 +172,7 @@ func restructure(rootDir string, dir string, name string, commands []*cobra.Comm } f := filepath.Join(dir, fullCmdFilename+".md") if _, err := os.Stat(f); err != nil { - if errors.Is(err, fs.ErrNotExist) { - continue - } - return fmt.Errorf("failed to get file info for %s: %w", f, err) + continue } if err := anonymizeHomedir(f); err != nil { return fmt.Errorf("failed to anonymize homedir in help text for command %s: %w", f, err)