Skip to content

Commit

Permalink
fix: handle empty stack YAML configuration and adjust file content re…
Browse files Browse the repository at this point in the history
…trieval
  • Loading branch information
haitham911 committed Nov 17, 2024
1 parent f909493 commit fbb6f2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Empty file.
6 changes: 5 additions & 1 deletion internal/exec/stack_processor_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ func ProcessYAMLConfigFile(
return nil, nil, nil, err
}
}
if stackYamlConfig == "" {
return map[string]any{}, map[string]map[string]any{}, map[string]any{}, nil

}

stackManifestTemplatesProcessed := stackYamlConfig
stackManifestTemplatesErrorMessage := ""
Expand Down Expand Up @@ -1874,7 +1878,7 @@ func CreateComponentStackMap(
func GetFileContent(filePath string) (string, error) {
existingContent, found := getFileContentSyncMap.Load(filePath)
if found && existingContent != nil {
return fmt.Sprintf("%s", existingContent), nil
return "", nil
}

content, err := os.ReadFile(filePath)
Expand Down

0 comments on commit fbb6f2a

Please sign in to comment.