Skip to content

Commit 33b01ea

Browse files
committed
refactor(charts): wrap AvailablePresets ReadDir error
The companion fn to PresetFiles still returned a raw fs.PathError behind a nolint:wrapcheck directive while PresetFiles wraps with errors.Wrap. Match the pattern: errors.Wrap with the operation description so an embedded-FS failure surfaces with context, not just a bare path error. Signed-off-by: Aleksei Sviridkin <f@lex.la>
1 parent 84757c2 commit 33b01ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

charts/charts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func AvailablePresets() ([]string, error) {
7676

7777
entries, err := embeddedCharts.ReadDir(".")
7878
if err != nil {
79-
return nil, err //nolint:wrapcheck // wrapper around embedded FS ReadDir.
79+
return nil, errors.Wrap(err, "reading embedded charts root")
8080
}
8181

8282
for _, entry := range entries {

0 commit comments

Comments
 (0)