Disable Manage Packages button if python is not installed (#6008)

This commit is contained in:
Cory Rivera
2019-06-17 18:28:16 -07:00
committed by GitHub
parent 59b0e6737f
commit cecc899949
5 changed files with 16 additions and 17 deletions

View File

@@ -17,6 +17,7 @@ import JupyterServerInstallation from './jupyterServerInstallation';
import * as utils from '../common/utils';
import { IServerInstance } from './common';
import { PerNotebookServerInstance, IInstanceOptions } from './serverInstance';
import { CommandContext } from '../common/constants';
export interface IServerManagerOptions {
documentPath: string;
@@ -101,9 +102,10 @@ export class LocalJupyterServerManager implements nb.ServerManager, vscode.Dispo
return this.options.documentPath;
}
private async doStartServer(): Promise<IServerInstance> { // We can't find or create servers until the installation is complete
private async doStartServer(): Promise<IServerInstance> { // We can't find or create servers until the installation is complete
let installation = this.options.jupyterInstallation;
await installation.promptForPythonInstall();
this.apiWrapper.setCommandContext(CommandContext.NotebookPythonInstalled, true);
// Calculate the path to use as the notebook-dir for Jupyter based on the path of the uri of the
// notebook to open. This will be the workspace folder if the notebook uri is inside a workspace