Skip to content

Commit a5899ff

Browse files
committed
cli/context/store: List(): don't interrupt listing for not-found errors
There's no reason to stop listing contexts if a context does not exist while iterating over the directories, Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 412d17a commit a5899ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/context/store/metadatastore.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ func (s *metadataStore) list() ([]Metadata, error) {
110110
for _, dir := range ctxDirs {
111111
c, err := s.getByID(contextdir(dir))
112112
if err != nil {
113+
if os.IsNotExist(err) {
114+
continue
115+
}
113116
return nil, err
114117
}
115118
res = append(res, c)

0 commit comments

Comments
 (0)