mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Code action on save failures should not block other actions from running
Fixes #65733
This commit is contained in:
@@ -321,7 +321,10 @@ class CodeActionOnParticipant implements ISaveParticipant {
|
||||
return new Promise<CodeAction[]>((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[]) {
|
||||
|
||||
Reference in New Issue
Block a user