Skip to content

Commit b4adce2

Browse files
authored
Merge pull request #29 from terassyi/fix-not-to-panic-when-initial-list
fix: return empty ListResult instead of nil to prevent panic when bas…
2 parents 3ead55f + ef113b8 commit b4adce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/oci/registry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func NewRegistry() *Registry {
2727

2828
func (r *Registry) List(ctx context.Context) (*mft.ListResult, error) {
2929
if _, err := os.Stat(baseDir); os.IsNotExist(err) {
30-
return nil, nil
30+
return mft.NewListResult(nil), nil
3131
}
3232

3333
var info []*mft.Info

0 commit comments

Comments
 (0)