mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
move eula prompt post azdata discovery (#12532)
* new download location of azdata.msi * move eula prompt post azdata discovery * unacceptEula - test change * Revert "unacceptEula - test change" This reverts commit f84a3f5e41797de25b38f87143d66f7041b5c4ec.
This commit is contained in:
@@ -31,21 +31,21 @@ export async function activate(context: vscode.ExtensionContext): Promise<azdata
|
|||||||
eulaAccepted = !!context.globalState.get<boolean>(constants.eulaAccepted); // fetch eula acceptance state from memento
|
eulaAccepted = !!context.globalState.get<boolean>(constants.eulaAccepted); // fetch eula acceptance state from memento
|
||||||
await vscode.commands.executeCommand('setContext', constants.eulaAccepted, eulaAccepted); // set a context key for current value of eulaAccepted state retrieved from memento so that command for accepting eula is available/unavailable in commandPalette appropriately.
|
await vscode.commands.executeCommand('setContext', constants.eulaAccepted, eulaAccepted); // set a context key for current value of eulaAccepted state retrieved from memento so that command for accepting eula is available/unavailable in commandPalette appropriately.
|
||||||
Logger.log(loc.eulaAcceptedStateOnStartup(eulaAccepted));
|
Logger.log(loc.eulaAcceptedStateOnStartup(eulaAccepted));
|
||||||
if (!eulaAccepted) {
|
|
||||||
// Don't block on this since we want extension to finish activating without requiring user actions.
|
|
||||||
// If EULA has not been accepted then we will check again while executing azdata commands.
|
|
||||||
promptForEula(context.globalState)
|
|
||||||
.then(async (userResponse: boolean) => {
|
|
||||||
eulaAccepted = userResponse;
|
|
||||||
})
|
|
||||||
.catch((err) => console.log(err));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't block on this since we want the extension to finish activating without needing user input
|
// Don't block on this since we want the extension to finish activating without needing user input
|
||||||
checkAndInstallAzdata() // install if not installed and user wants it.
|
checkAndInstallAzdata() // install if not installed and user wants it.
|
||||||
.then(async azdataTool => {
|
.then(async azdataTool => {
|
||||||
localAzdata = azdataTool;
|
localAzdata = azdataTool;
|
||||||
if (localAzdata !== undefined) {
|
if (localAzdata !== undefined) {
|
||||||
|
if (!eulaAccepted) {
|
||||||
|
// Don't block on this since we want extension to finish activating without requiring user actions.
|
||||||
|
// If EULA has not been accepted then we will check again while executing azdata commands.
|
||||||
|
promptForEula(context.globalState)
|
||||||
|
.then(async (userResponse: boolean) => {
|
||||||
|
eulaAccepted = userResponse;
|
||||||
|
})
|
||||||
|
.catch((err) => console.log(err));
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
//update if available and user wants it.
|
//update if available and user wants it.
|
||||||
if (await checkAndUpdateAzdata(localAzdata)) { // if an update was performed
|
if (await checkAndUpdateAzdata(localAzdata)) { // if an update was performed
|
||||||
|
|||||||
Reference in New Issue
Block a user