Skip to content

Commit

Permalink
fix: Fix build of the che-commands extension
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <[email protected]>

rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
RomanNikitenko committed Aug 8, 2024
1 parent a869d8a commit 4519713
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/extensions/che-commands/src/taskProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4519713

Please sign in to comment.