Check if python executable exists before querying user package directory. (#6345)

This commit is contained in:
Cory Rivera
2019-07-09 17:58:26 -07:00
committed by Charles Gagnon
parent d2e758c0d7
commit 78a42e1d11

View File

@@ -256,8 +256,7 @@ export class JupyterServerInstallation {
} }
} }
let isPythonInstalled = await JupyterServerInstallation.isPythonInstalled(this.apiWrapper); if (fs.existsSync(this._pythonExecutable)) {
if (isPythonInstalled) {
let pythonUserDir = await this.getPythonUserDir(this._pythonExecutable); let pythonUserDir = await this.getPythonUserDir(this._pythonExecutable);
if (pythonUserDir) { if (pythonUserDir) {
this.pythonEnvVarPath = pythonUserDir + delimiter + this.pythonEnvVarPath; this.pythonEnvVarPath = pythonUserDir + delimiter + this.pythonEnvVarPath;