Skip to content

Commit

Permalink
Merge pull request JulienCroain#27 from informagico/feature-reload-on…
Browse files Browse the repository at this point in the history
…-install

Add Reload Window on extension install/update
  • Loading branch information
JulienCroain authored Apr 21, 2023
2 parents 2665493 + f911f87 commit bca1a63
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/commands/installUpdateExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ function installExtension(extension) {
.then(() => {
vscode.window.showInformationMessage(
`${extension.displayName} (${extension.version}) installed.`,
'Ok'
)
vscode.commands.executeCommand('privateExtensionManager.checkForUpdates')
'Ok',
'Reload Window'
).then(selection => {
if (selection === 'Reload Window') {
vscode.commands.executeCommand("workbench.action.reloadWindow")
}

vscode.commands.executeCommand('privateExtensionManager.checkForUpdates')
})
}, reason => {
vscode.window.showErrorMessage(
`${extension.displayName} (${extension.version}) installation failed.${reason}`,
Expand Down

0 comments on commit bca1a63

Please sign in to comment.