(root, name string)
| 82 | } |
| 83 | |
| 84 | func 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 | } |
no test coverage detected
searching dependent graphs…