From 76441cf408da84a08b15f74389d9f4a9f6c2d5a1 Mon Sep 17 00:00:00 2001 From: Artem Zatsarynnyi Date: Fri, 24 Mar 2023 11:30:27 +0200 Subject: [PATCH] fix: Filter out the editor-provided commands Filter out the editor-provided Devfile commands as they are not expected to be run by the user. --- code/extensions/che-commands/src/taskProvider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/extensions/che-commands/src/taskProvider.ts b/code/extensions/che-commands/src/taskProvider.ts index 1a35aff5b4e..a9381c1c20b 100644 --- a/code/extensions/che-commands/src/taskProvider.ts +++ b/code/extensions/che-commands/src/taskProvider.ts @@ -37,6 +37,7 @@ 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'] !== 'editor') .map(command => this.createCheTask(command.exec?.label || command.id, command.exec?.commandLine!, command.exec?.workingDir || '${PROJECT_SOURCE}', command.exec?.component!)); return cheTasks; }