Fix logging the error so it doesn't panic

This commit is contained in:
Volodymyr Zotov
2025-07-08 16:41:49 -05:00
parent a5416f4532
commit 1e9c04ee05

View File

@@ -120,7 +120,7 @@ func BuildKubernetesSecretData(fields []model.ItemField, files []model.File) map
for _, file := range files {
content, err := file.Content()
if err != nil {
log.Error(err, "Could not load contents of file %s", file.Name)
log.Error(err, fmt.Sprintf("Could not load contents of file %s", file.Name))
continue
}
if content != nil {