Correctly handle exceptions in package upgrade promise. (#7734)

This commit is contained in:
Cory Rivera
2019-10-15 13:50:30 -07:00
committed by GitHub
parent ee2850f2e2
commit b6ef5469de

View File

@@ -463,12 +463,16 @@ export class JupyterServerInstallation {
} }
if (doUpgrade) { if (doUpgrade) {
let installPromise = new Promise(async resolve => { let installPromise = new Promise(async (resolve, reject) => {
if (this._usingConda) { try {
await this.installCondaPackages(condaPackagesToInstall, true); if (this._usingConda) {
await this.installCondaPackages(condaPackagesToInstall, true);
}
await this.installPipPackages(pipPackagesToInstall, true);
resolve();
} catch (err) {
reject(err);
} }
await this.installPipPackages(pipPackagesToInstall, true);
resolve();
}); });
if (promptForUpgrade) { if (promptForUpgrade) {