Skip to content
7 changes: 5 additions & 2 deletions src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2190,8 +2190,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
if (updatedTask) {
await this.run(updatedTask);
} else {
// Task no longer exists, show warning
this._notificationService.warn(nls.localize('TaskSystem.taskNoLongerExists', 'Task {0} no longer exists or has been modified. Cannot restart.', task.configurationProperties.name));
const success = await this.run(task);
if (!success || (typeof success.exitCode === 'number' && success.exitCode !== 0)) {
// Task no longer exists, show warning
this._notificationService.warn(nls.localize('TaskSystem.taskNoLongerExists', 'Task {0} no longer exists or has been modified. Cannot restart.', task.configurationProperties.name));
}
}
} catch {
// eat the error, we don't care about it here
Expand Down
Loading