Skip to content

Commit

Permalink
Update module.go (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilos77 authored Nov 14, 2024
1 parent f9f340b commit 83147b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ func getReloadedKyma(ctx context.Context) (*ResourceDefn, error) {

func getKymaModuleIndexInSpec(moduleName string, obj map[string]interface{}) (int, []interface{}, error) {
modules, exists, err := unstructured.NestedSlice(obj, "spec", "modules")
if !exists || err != nil {
if !exists {
return -1, []interface{}{}, nil
}
if err != nil {
return -1, nil, fmt.Errorf("error reading kyma spec modules: %w", err)
}

Expand Down

0 comments on commit 83147b7

Please sign in to comment.