diff --git a/go/cmd/internal/docgen/docgen.go b/go/cmd/internal/docgen/docgen.go index 0079ecee56c..f6c7e6b098d 100644 --- a/go/cmd/internal/docgen/docgen.go +++ b/go/cmd/internal/docgen/docgen.go @@ -171,12 +171,7 @@ func restructure(rootDir string, dir string, name string, commands []*cobra.Comm continue } f := filepath.Join(dir, fullCmdFilename+".md") - if _, err := os.Stat(f); err != nil { - continue - } - if err := anonymizeHomedir(f); err != nil { - return fmt.Errorf("failed to anonymize homedir in help text for command %s: %w", f, err) - } + _ = anonymizeHomedir(f) // it is possible that the file does not exist, so we ignore the error continue } }