diff --git a/go/cmd/internal/docgen/docgen.go b/go/cmd/internal/docgen/docgen.go index 13da886b318..0079ecee56c 100644 --- a/go/cmd/internal/docgen/docgen.go +++ b/go/cmd/internal/docgen/docgen.go @@ -201,6 +201,9 @@ func anonymizeHomedir(file string) (err error) { if err != nil { return err } + if _, err := os.Stat(file); err != nil { + return nil + } // We're replacing the stuff inside the square brackets in the example sed // below: