Hide installation options in Configure Python wizard if python is already setup. (#10635)

This commit is contained in:
Cory Rivera
2020-05-29 17:28:02 -07:00
committed by GitHub
parent d1b1550ce5
commit 98ce3c74e6
9 changed files with 393 additions and 162 deletions

View File

@@ -237,7 +237,11 @@ export class JupyterSession implements nb.ISession {
public async changeKernel(kernelInfo: nb.IKernelSpec): Promise<nb.IKernel> {
if (this._installation) {
try {
await this._installation.promptForPackageUpgrade(kernelInfo.display_name);
if (this._installation.previewFeaturesEnabled) {
await this._installation.promptForPythonInstall(kernelInfo.display_name);
} else {
await this._installation.promptForPackageUpgrade(kernelInfo.display_name);
}
} catch (err) {
// Have to swallow the error here to prevent hangs when changing back to the old kernel.
console.error(err.toString());