diff --git a/code/extensions/che-commands/src/taskProvider.ts b/code/extensions/che-commands/src/taskProvider.ts index 42caf392a15..09dbf18fb9c 100644 --- a/code/extensions/che-commands/src/taskProvider.ts +++ b/code/extensions/che-commands/src/taskProvider.ts @@ -37,7 +37,8 @@ export class DevfileTaskProvider implements vscode.TaskProvider { const cheTasks: vscode.Task[] = devfileCommands! .filter(command => command.exec?.commandLine) - .filter(command => !command.attributes || (command.attributes as any)['controller.devfile.io/imported-by'] === (undefined || 'parent')) + .filter(command => !command.attributes || + ('controller.devfile.io/imported-by' in command.attributes && [undefined, 'parent'].includes((command.attributes as any)['controller.devfile.io/imported-by']))) .map(command => this.createCheTask(command.exec?.label || command.id, command.exec?.commandLine!, command.exec?.workingDir || '${PROJECT_SOURCE}', command.exec?.component!, command.exec?.env)); return cheTasks; }