Fixes #35022: Transition from task 0.1.0 to 2.0.0 produces errors
This commit is contained in:
parent
06a2f97a23
commit
29f17e701a
1 changed files with 21 additions and 15 deletions
|
@ -614,6 +614,7 @@ class TaskService extends EventEmitter implements ITaskService {
|
|||
|
||||
this._configHasErrors = false;
|
||||
this._workspaceTasksPromise = undefined;
|
||||
this._taskSystem = undefined;
|
||||
this._taskSystemListeners = [];
|
||||
this._outputChannel = this.outputService.getChannel(TaskService.OutputChannelId);
|
||||
this._providers = new Map<number, ITaskProvider>();
|
||||
|
@ -625,7 +626,8 @@ class TaskService extends EventEmitter implements ITaskService {
|
|||
this._outputChannel.clear();
|
||||
}
|
||||
let folderSetup = this.computeWorkspaceFolderSetup();
|
||||
if (this.executionEngine !== folderSetup[1] && this._taskSystem && this._taskSystem.getActiveTasks().length > 0) {
|
||||
if (this.executionEngine !== folderSetup[1]) {
|
||||
if (this._taskSystem && this._taskSystem.getActiveTasks().length > 0) {
|
||||
this.messageService.show(
|
||||
Severity.Info,
|
||||
{
|
||||
|
@ -640,6 +642,10 @@ class TaskService extends EventEmitter implements ITaskService {
|
|||
}
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
this.disposeTaskSystemListeners();
|
||||
this._taskSystem = undefined;
|
||||
}
|
||||
}
|
||||
this.updateSetup(folderSetup);
|
||||
this.updateWorkspaceTasks();
|
||||
|
|
Loading…
Reference in a new issue