@@ -203,9 +203,7 @@ export class BrowserWindow extends Disposable {
203
203
204
204
invokeProtocolHandler ( ) ;
205
205
206
- // We cannot know whether the protocol handler succeeded.
207
- // Display guidance in case it did not, e.g. the app is not installed locally.
208
- if ( matchesScheme ( href , this . productService . urlProtocol ) ) {
206
+ const showProtocolUrlOpenedDialog = async ( ) => {
209
207
const showResult = await this . dialogService . show (
210
208
Severity . Info ,
211
209
localize ( 'openExternalDialogTitle' , "All done. You can close this tab now." ) ,
@@ -223,12 +221,22 @@ export class BrowserWindow extends Disposable {
223
221
if ( showResult . choice === 0 ) {
224
222
invokeProtocolHandler ( ) ;
225
223
} else if ( showResult . choice === 1 ) {
224
+ // Route the user to the appropriate install link
226
225
await this . openerService . open ( URI . parse (
227
226
this . productService . quality === 'stable'
228
227
? `http://aka.ms/vscode-install`
229
228
: `http://aka.ms/vscode-install-insiders`
230
229
) ) ;
230
+
231
+ // Re-show the dialog so that the user can come back after installing and try again
232
+ showProtocolUrlOpenedDialog ( ) ;
231
233
}
234
+ } ;
235
+
236
+ // We cannot know whether the protocol handler succeeded.
237
+ // Display guidance in case it did not, e.g. the app is not installed locally.
238
+ if ( matchesScheme ( href , this . productService . urlProtocol ) ) {
239
+ await showProtocolUrlOpenedDialog ( ) ;
232
240
}
233
241
}
234
242
0 commit comments