@@ -193,22 +193,16 @@ func parseParentAndPlugin(d DevfileObj, resolveCtx *resolutionContextTree, tool
193
193
switch {
194
194
case parent .Uri != "" :
195
195
parentDevfileObj , err = parseFromURI (parent .ImportReference , d .Ctx , resolveCtx , tool )
196
- if err != nil {
197
- return err
198
- }
199
196
case parent .Id != "" :
200
197
parentDevfileObj , err = parseFromRegistry (parent .ImportReference , resolveCtx , tool )
201
- if err != nil {
202
- return err
203
- }
204
198
case parent .Kubernetes != nil :
205
199
parentDevfileObj , err = parseFromKubeCRD (parent .ImportReference , resolveCtx , tool )
206
- if err != nil {
207
- return err
208
- }
209
200
default :
210
201
return fmt .Errorf ("devfile parent does not define any resources" )
211
202
}
203
+ if err != nil {
204
+ return err
205
+ }
212
206
213
207
parentWorkspaceContent := parentDevfileObj .Data .GetDevfileWorkspaceSpecContent ()
214
208
// add attribute to parent elements
@@ -247,19 +241,16 @@ func parseParentAndPlugin(d DevfileObj, resolveCtx *resolutionContextTree, tool
247
241
switch {
248
242
case plugin .Uri != "" :
249
243
pluginDevfileObj , err = parseFromURI (plugin .ImportReference , d .Ctx , resolveCtx , tool )
250
- if err != nil {
251
- return err
252
- }
253
244
case plugin .Id != "" :
254
245
pluginDevfileObj , err = parseFromRegistry (plugin .ImportReference , resolveCtx , tool )
255
- if err != nil {
256
- return err
257
- }
258
246
case plugin .Kubernetes != nil :
259
247
pluginDevfileObj , err = parseFromKubeCRD (plugin .ImportReference , resolveCtx , tool )
260
248
default :
261
249
return fmt .Errorf ("plugin %s does not define any resources" , component .Name )
262
250
}
251
+ if err != nil {
252
+ return err
253
+ }
263
254
pluginWorkspaceContent := pluginDevfileObj .Data .GetDevfileWorkspaceSpecContent ()
264
255
// add attribute to plugin elements
265
256
err = addSourceAttributesForOverrideAndMerge (plugin .ImportReference , pluginWorkspaceContent )
0 commit comments