Show an Install Skipped message when Python already exists at the specified install location. (#5141)

* Also fixed a bug where future installs would get blocked after doing an install that gets skipped.
This commit is contained in:
Cory Rivera
2019-04-22 14:28:59 -07:00
committed by GitHub
parent 161135cd90
commit 1b24dff738
2 changed files with 7 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ const msgInstallPkgStart = localize('msgInstallPkgStart', "Installing Notebook d
const msgInstallPkgFinish = localize('msgInstallPkgFinish', "Notebook dependencies installation is complete");
const msgPythonRunningError = localize('msgPythonRunningError', "Cannot overwrite existing Python installation while python is running.");
const msgPendingInstallError = localize('msgPendingInstallError', "Another Python installation is currently in progress.");
const msgSkipPythonInstall = localize('msgSkipPythonInstall', "Python already exists at the specific location. Skipping install.");
function msgDependenciesInstallationFailed(errorMessage: string): string { return localize('msgDependenciesInstallationFailed', "Installing Notebook dependencies failed with error: {0}", errorMessage); }
function msgDownloadPython(platform: string, pythonDownloadUrl: string): string { return localize('msgDownloadPython', "Downloading local python for platform: {0} to {1}", platform, pythonDownloadUrl); }
@@ -298,6 +299,8 @@ export default class JupyterServerInstallation {
// so update it here
await updateConfig();
installReady.resolve();
this._installInProgress = false;
this.apiWrapper.showInfoMessage(msgSkipPythonInstall);
}
return installReady.promise;
}