Skip to content

Commit

Permalink
cli/context/store: List(): don't interrupt listing for not-found errors
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thaJeztah committed Sep 28, 2022
1 parent 412d17a commit a5899ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/context/store/metadatastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ func (s *metadataStore) list() ([]Metadata, error) {
for _, dir := range ctxDirs {
c, err := s.getByID(contextdir(dir))
if err != nil {
if os.IsNotExist(err) {
continue
}
return nil, err
}
res = append(res, c)
Expand Down

0 comments on commit a5899ff

Please sign in to comment.