mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add additional error handling to Python installation for Notebooks (#4891)
* Also enabled integration tests for python installation.
This commit is contained in:
@@ -13,6 +13,7 @@ import * as nls from 'vscode-nls';
|
||||
import { JupyterController } from './jupyter/jupyterController';
|
||||
import { AppContext } from './common/appContext';
|
||||
import { ApiWrapper } from './common/apiWrapper';
|
||||
import { IExtensionApi } from './types';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -20,10 +21,9 @@ const JUPYTER_NOTEBOOK_PROVIDER = 'jupyter';
|
||||
const msgSampleCodeDataFrame = localize('msgSampleCodeDataFrame', 'This sample code loads the file into a data frame and shows the first 10 results.');
|
||||
const noNotebookVisible = localize('noNotebookVisible', 'No notebook editor is active');
|
||||
|
||||
let controller: JupyterController;
|
||||
|
||||
export let controller: JupyterController;
|
||||
|
||||
export function activate(extensionContext: vscode.ExtensionContext) {
|
||||
export async function activate(extensionContext: vscode.ExtensionContext): Promise<IExtensionApi> {
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.new', (context?: azdata.ConnectedContext) => {
|
||||
let connectionProfile: azdata.IConnectionProfile = undefined;
|
||||
if (context && context.connectionProfile) {
|
||||
@@ -49,7 +49,16 @@ export function activate(extensionContext: vscode.ExtensionContext) {
|
||||
|
||||
let appContext = new AppContext(extensionContext, new ApiWrapper());
|
||||
controller = new JupyterController(appContext);
|
||||
controller.activate();
|
||||
let result = await controller.activate();
|
||||
if (!result) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
getJupyterController() {
|
||||
return controller;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function newNotebook(connectionProfile: azdata.IConnectionProfile) {
|
||||
|
||||
Reference in New Issue
Block a user