Skip to content

Commit

Permalink
Detect s2i component by sourceType which is set only for s2i comps
Browse files Browse the repository at this point in the history
This PR fixes redhat-developer#2146.

Signed-off-by: Denis Golovin dgolovin@redhat.com
  • Loading branch information
dgolovin committed May 18, 2021
1 parent f87cdd7 commit c1bcce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/odo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ export class OdoImpl implements Odo {
comp.contextValue = ContextType.COMPONENT_PUSHED;
this.subject.next(new OdoEventImpl('changed', comp));
} else if (!comp) {
const newComponent = new OpenShiftComponent(app, added.metadata.name, ContextType.COMPONENT, Uri.file(added.status.context), added.spec.sourceType, added.spec.type.split(':')[1] ? ComponentKind.S2I : ComponentKind.DEVFILE, { name: added.spec.type.split(':')[0], tag: added.spec.type.split(':')[1]});
const newComponent = new OpenShiftComponent(app, added.metadata.name, ContextType.COMPONENT, Uri.file(added.status.context), added.spec.sourceType, added.spec.sourceType ? ComponentKind.S2I : ComponentKind.DEVFILE, { name: added.spec.type.split(':')[0], tag: added.spec.type.split(':')[1]});
this.insertAndRefresh(newComponent);
}
} else if (!app) {
Expand Down

0 comments on commit c1bcce2

Please sign in to comment.