Skip to content

Commit 0237863

Browse files
fix: handle cancellation errors inside edit session identity provider (#247450)
1 parent b8bf4f1 commit 0237863

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

extensions/git/src/editSessionIdentityProvider.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ export class GitEditSessionIdentityProvider implements vscode.EditSessionIdentit
1616
this.providerRegistration = vscode.Disposable.from(
1717
vscode.workspace.registerEditSessionIdentityProvider('file', this),
1818
vscode.workspace.onWillCreateEditSessionIdentity((e) => {
19-
e.waitUntil(this._onWillCreateEditSessionIdentity(e.workspaceFolder));
19+
e.waitUntil(
20+
this._onWillCreateEditSessionIdentity(e.workspaceFolder).catch(err => {
21+
if (err instanceof vscode.CancellationError) {
22+
throw err;
23+
}
24+
})
25+
);
2026
})
2127
);
2228
}

0 commit comments

Comments
 (0)