(path string)
| 58 | } |
| 59 | |
| 60 | func profileIsNotEmpty(path string) (bool, error) { |
| 61 | entries, err := os.ReadDir(path) |
| 62 | if err != nil { |
| 63 | return false, errors.WithStack(err) |
| 64 | } |
| 65 | for _, entry := range entries { |
| 66 | if entry.Name() != configfile.DefaultName || |
| 67 | isModifiedConfig(filepath.Join(path, entry.Name())) { |
| 68 | return true, nil |
| 69 | } |
| 70 | } |
| 71 | return false, nil |
| 72 | } |
| 73 | |
| 74 | func isModifiedConfig(path string) bool { |
| 75 | if filepath.Base(path) == configfile.DefaultName { |
no test coverage detected