MCPcopy Index your code
hub / github.com/helm/helm / removeRepoCache

Function removeRepoCache

pkg/cmd/repo_remove.go:84–97  ·  view source on GitHub ↗
(root, name string)

Source from the content-addressed store, hash-verified

82}
83
84func removeRepoCache(root, name string) error {
85 idx := filepath.Join(root, helmpath.CacheChartsFile(name))
86 if _, err := os.Stat(idx); err == nil {
87 os.Remove(idx)
88 }
89
90 idx = filepath.Join(root, helmpath.CacheIndexFile(name))
91 if _, err := os.Stat(idx); errors.Is(err, fs.ErrNotExist) {
92 return nil
93 } else if err != nil {
94 return fmt.Errorf("can't remove index file %s: %w", idx, err)
95 }
96 return os.Remove(idx)
97}

Callers 1

runMethod · 0.85

Calls 4

CacheChartsFileFunction · 0.92
CacheIndexFileFunction · 0.92
IsMethod · 0.80
RemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…