check if the directory exists to create file. creates if doesn't exist
(file string)
| 751 | |
| 752 | // check if the directory exists to create file. creates if doesn't exist |
| 753 | func ensureDirectoryForFile(file string) error { |
| 754 | baseDir := filepath.Dir(file) |
| 755 | _, err := os.Stat(baseDir) |
| 756 | if err != nil && !errors.Is(err, fs.ErrNotExist) { |
| 757 | return err |
| 758 | } |
| 759 | |
| 760 | return os.MkdirAll(baseDir, defaultDirectoryPermission) |
| 761 | } |
| 762 | |
| 763 | // NameAndChart returns the name and chart that should be used. |
| 764 | // |
no test coverage detected
searching dependent graphs…