From 6348cddbedf4b3a26e28a10658e2cca182ac71a0 Mon Sep 17 00:00:00 2001 From: Rohit Nayak Date: Sun, 15 Dec 2024 16:16:40 +0100 Subject: [PATCH] Also ignore any Stat errors since dir may not have been created yet Signed-off-by: Rohit Nayak --- go/cmd/internal/docgen/docgen.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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)