Add more error handling for python installation (#22650)

This commit is contained in:
Cory Rivera
2023-04-07 14:55:17 -07:00
committed by GitHub
parent 6a2ec12a35
commit 0412ba194b

View File

@@ -430,7 +430,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
this._installInProgress = true;
this._installCompletion = new Deferred<void>();
try {
this._pythonInstallationPath = installSettings.installPath;
this._usingExistingPython = installSettings.existingPython;
await this.configurePackagePaths();
@@ -470,11 +470,16 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
.catch(err => {
let errorMsg = msgDependenciesInstallationFailed(utils.getErrorMessage(err));
op.updateStatus(azdata.TaskStatus.Failed, errorMsg);
this._installCompletion.reject(errorMsg);
this._installCompletion.reject(new Error(errorMsg));
this._installInProgress = false;
});
}
});
} catch (err) {
let errorMsg = msgDependenciesInstallationFailed(utils.getErrorMessage(err));
this._installCompletion.reject(new Error(errorMsg));
this._installInProgress = false;
}
return this._installCompletion.promise;
}