diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 336c45589ea015f77760a4d74ebf00f3ee79e7d9..fbd0da16882b361b03f842718809097bdcefc1f7 100755 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -695,7 +695,13 @@ export class CommandCenter { viewColumn: ViewColumn.Active }; - const document = await workspace.openTextDocument(uri); + let document; + try { + document = await workspace.openTextDocument(uri); + } catch (error) { + await commands.executeCommand('vscode.open', uri, opts); + continue; + } // Check if active text editor has same path as other editor. we cannot compare via // URI.toString() here because the schemas can be different. Instead we just go by path.