Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

Commit 2fb4c26

Browse files
author
Anuj Chaudhari
committed
Do not throw error if catalog cache doesn't exist
1 parent 050a1f3 commit 2fb4c26

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/v1/cli/catalog/catalog.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import (
1818

1919
const (
2020
// catalogCacheFileName is the name of the file which holds Catalog cache
21-
// TODO: Use the original catalog file instead of using v2 once the feature is enabled by default
22-
catalogCacheFileName = "catalog_v2.yaml"
21+
catalogCacheFileName = "catalog.yaml"
2322
)
2423

2524
var (
@@ -202,7 +201,7 @@ func saveCatalogCache(catalog *cliv1alpha1.Catalog) error {
202201

203202
// CleanCatalogCache cleans the catalog cache
204203
func CleanCatalogCache() error {
205-
if err := os.Remove(getCatalogCachePath()); err != nil {
204+
if err := os.Remove(getCatalogCachePath()); err != nil && !errors.Is(err, os.ErrNotExist) {
206205
return err
207206
}
208207
return nil

0 commit comments

Comments
 (0)