提交 d514636c 编写于 作者: A Alex Ross

Tasks with failed dependsOn can't run

Fixes #92814
上级 f2efe3e2
......@@ -368,11 +368,7 @@ export class TerminalTaskSystem implements ITaskSystem {
});
}
private removeFromActiveTasks(task: Task): void {
if (!this.activeTasks[task.getMapKey()]) {
return;
}
delete this.activeTasks[task.getMapKey()];
private removeInstances(task: Task) {
let commonKey = task._id.split('|')[0];
if (this.instances[commonKey]) {
this.instances[commonKey].removeInstance();
......@@ -382,6 +378,14 @@ export class TerminalTaskSystem implements ITaskSystem {
}
}
private removeFromActiveTasks(task: Task): void {
if (!this.activeTasks[task.getMapKey()]) {
return;
}
delete this.activeTasks[task.getMapKey()];
this.removeInstances(task);
}
public terminate(task: Task): Promise<TaskTerminateResponse> {
let activeTerminal = this.activeTasks[task.getMapKey()];
if (!activeTerminal) {
......@@ -466,6 +470,7 @@ export class TerminalTaskSystem implements ITaskSystem {
return Promise.all(promises).then((summaries): Promise<ITaskSummary> | ITaskSummary => {
for (let summary of summaries) {
if (summary.exitCode !== 0) {
this.removeInstances(task);
return { exitCode: summary.exitCode };
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册