@@ -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,8 +221,22 @@ export class BrowserWindow extends Disposable {
223
221
if ( showResult . choice === 0 ) {
224
222
invokeProtocolHandler ( ) ;
225
223
} else if ( showResult . choice === 1 ) {
226
- await this . openerService . open ( URI . parse ( `http://aka.ms/vscode-install` ) ) ;
224
+ // Route the user to the appropriate install link
225
+ await this . openerService . open ( URI . parse (
226
+ this . productService . quality === 'stable'
227
+ ? `http://aka.ms/vscode-install`
228
+ : `http://aka.ms/vscode-install-insiders`
229
+ ) ) ;
230
+
231
+ // Re-show the dialog so that the user can come back after installing and try again
232
+ showProtocolUrlOpenedDialog ( ) ;
227
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 ( ) ;
228
240
}
229
241
}
230
242
0 commit comments