diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index bece1ac592a4ce9bc392780aa321e2aa34f09053..5ad913ba1ff3da9568a251c881c8b39eef8aed33 100755 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -700,7 +700,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.