Skip to content

Commit 85a2b77

Browse files
committed
Fix regression package.json task fail to re-run
1 parent 3af2cf6 commit 85a2b77

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,8 +2190,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
21902190
if (updatedTask) {
21912191
await this.run(updatedTask);
21922192
} else {
2193-
// Task no longer exists, show warning
2194-
this._notificationService.warn(nls.localize('TaskSystem.taskNoLongerExists', 'Task {0} no longer exists or has been modified. Cannot restart.', task.configurationProperties.name));
2193+
const success = await this.run(task);
2194+
if (success?.exitCode === 1) {
2195+
// Task no longer exists, show warning
2196+
this._notificationService.warn(nls.localize('TaskSystem.taskNoLongerExists', 'Task {0} no longer exists or has been really modified. Cannot restart.', task.configurationProperties.name));
2197+
}
21952198
}
21962199
} catch {
21972200
// eat the error, we don't care about it here

0 commit comments

Comments
 (0)