From c809337d5c32107a65bb8814a9e91048f1dfd75a Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 2 Jan 2019 14:03:49 -0800 Subject: [PATCH] Code action on save failures should not block other actions from running Fixes #65733 --- .../api/electron-browser/mainThreadSaveParticipant.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 4439085c120..180064b7c85 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -321,7 +321,10 @@ class CodeActionOnParticipant implements ISaveParticipant { return new Promise((resolve, reject) => { setTimeout(() => reject(localize('codeActionsOnSave.didTimeout', "Aborted codeActionsOnSave after {0}ms", timeout)), timeout); this.getActionsToRun(model, codeActionsOnSave).then(resolve); - }).then(actionsToRun => this.applyCodeActions(actionsToRun)); + }).then(actionsToRun => { + // Failure to apply a code action should not block other on save actions + return this.applyCodeActions(actionsToRun).catch(() => undefined); + }); } private async applyCodeActions(actionsToRun: CodeAction[]) {