Skip to content

Commit 7710b45

Browse files
committed
Update warning to be blocking
1 parent d4362bb commit 7710b45

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/core/src/lambda/uriHandlers.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@ import * as vscode from 'vscode'
77
import * as nls from 'vscode-nls'
88

99
import { SearchParams } from '../shared/vscode/uriHandler'
10-
import { showMessage } from '../shared/utilities/messages'
10+
import { showConfirmationMessage } from '../shared/utilities/messages'
1111
import globals from '../shared/extensionGlobals'
12+
import { VSCODE_EXTENSION_ID } from '../shared/extensions'
1213

1314
const localize = nls.loadMessageBundle()
1415

1516
export function registerLambdaUriHandler() {
1617
async function openFunctionHandler(params: ReturnType<typeof parseOpenParams>) {
17-
await showMessage(
18-
'warn',
19-
localize(
18+
const response = await showConfirmationMessage({
19+
prompt: localize(
2020
'AWS.lambda.uriUnavailable',
21-
'The URI handler you are attempting to open is not handled in this version of the toolkit, try installing the latest version'
22-
)
23-
)
21+
'The URI you are attempting to access is not in this version of the Toolkit'
22+
),
23+
confirm: localize('AWS.installLatest', 'Install latest'),
24+
})
25+
if (response) {
26+
await vscode.commands.executeCommand('extension.open', VSCODE_EXTENSION_ID.awstoolkit)
27+
}
2428
}
2529

2630
return vscode.Disposable.from(

0 commit comments

Comments
 (0)