Skip to content

Commit ed9297c

Browse files
committed
Detect s2i component by sourceType which is set only for s2i comps
This PR fixes #2146. Signed-off-by: Denis Golovin dgolovin@redhat.com
1 parent 4aa7aa7 commit ed9297c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/odo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ export class OdoImpl implements Odo {
10491049
comp.contextValue = ContextType.COMPONENT_PUSHED;
10501050
this.subject.next(new OdoEventImpl('changed', comp));
10511051
} else if (!comp) {
1052-
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]});
1052+
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]});
10531053
this.insertAndRefresh(newComponent);
10541054
}
10551055
} else if (!app) {

0 commit comments

Comments
 (0)