Skip to content

Commit

Permalink
Consider taskConfig.type when running tasks.
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <tmader@redhat.com>
  • Loading branch information
tsmaeder committed Apr 15, 2021
1 parent c1841b3 commit 8b9fb43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/task/src/browser/process/process-task-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export class ProcessTaskResolver implements TaskResolver {
* sane default values. Also, resolve all known variables, e.g. `${workspaceFolder}`.
*/
async resolveTask(taskConfig: TaskConfiguration): Promise<TaskConfiguration> {
if (taskConfig.taskType !== 'process' && taskConfig.taskType !== 'shell') {
const type = taskConfig.taskType || taskConfig.type;
if (type !== 'process' && type !== 'shell') {
throw new Error('Unsupported task configuration type.');
}
const context = typeof taskConfig._scope === 'string' ? new URI(taskConfig._scope) : undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/task/src/node/process/process-task-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class ProcessTaskRunner implements TaskRunner {
*/
let commandLine: string | undefined;

if (taskConfig.type === 'shell') {
if ((taskConfig.taskType || taskConfig.type) === 'shell') {
// When running a shell task, we have to spawn a shell process somehow,
// and tell it to run the command the user wants to run inside of it.
//
Expand Down

0 comments on commit 8b9fb43

Please sign in to comment.