Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Commit 5ed5516

Browse files
author
zhouhao
committed
Returns an error if the condition is not met
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
1 parent b809c3b commit 5ed5516

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

image/descriptor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func listReferences(w walker) (map[string]*descriptor, error) {
5454

5555
if err := w.walk(func(path string, info os.FileInfo, r io.Reader) error {
5656
if info.IsDir() || !strings.HasPrefix(path, "refs") {
57-
return nil
57+
return nil, errors.New("Can't list References by this condition")
5858
}
5959

6060
var d descriptor

0 commit comments

Comments
 (0)