mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Manual azdata installation/upgrade using Readme (#12023)
* code complete * string fixes * show logger * pr feedback
This commit is contained in:
@@ -4,23 +4,16 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdataExt from 'azdata-ext';
|
||||
import * as vscode from 'vscode';
|
||||
import { checkAndUpgradeAzdata, findAzdata, IAzdataTool } from './azdata';
|
||||
import { findAzdata, IAzdataTool, manuallyInstallOrUpgradeAzdata } from './azdata';
|
||||
import * as loc from './localizedConstants';
|
||||
|
||||
let localAzdata: IAzdataTool | undefined = undefined;
|
||||
|
||||
export async function activate(): Promise<azdataExt.IExtension> {
|
||||
localAzdata = await checkForAzdata();
|
||||
// Don't block on this since we want the extension to finish activating without needing user input
|
||||
// upgrade if available and user wants it.
|
||||
checkAndUpgradeAzdata(localAzdata)
|
||||
.then(async upgradePerformed => {
|
||||
if (upgradePerformed) { // If upgrade was performed then find and save the new azdata
|
||||
localAzdata = await findAzdata();
|
||||
}
|
||||
})
|
||||
.catch(err => vscode.window.showWarningMessage(loc.upgradeError(err)));
|
||||
// Don't block on this since we want the extension to finish activating without user actions
|
||||
manuallyInstallOrUpgradeAzdata(localAzdata)
|
||||
.catch(err => console.log(err));
|
||||
return {
|
||||
azdata: {
|
||||
arc: {
|
||||
|
||||
Reference in New Issue
Block a user