Skip to content

Commit

Permalink
Also ignore any Stat errors since dir may not have been created yet
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Nayak <[email protected]>
  • Loading branch information
rohit-nayak-ps committed Dec 15, 2024
1 parent c42498d commit 6348cdd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions go/cmd/internal/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6348cdd

Please sign in to comment.