From 5789f417d4f7ce0c37c34945f96f6e2001731143 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 24 Aug 2021 18:24:57 -0500 Subject: [PATCH] fix: fix replacing $PIPENV_PATH in the python path --- lib/main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index 0b61cd62..4e004acb 100644 --- a/lib/main.js +++ b/lib/main.js @@ -79,11 +79,15 @@ class PythonLanguageClient extends AutoLanguageClient { } let pythonBin = atom.config.get("ide-python.python") || "python3" + + // replace $PIPENV_PATH in the path + pythonBin = replacePipEnvPathVar(pythonBin, venvPath) + + // check if it exists if (whichSync(pythonBin, { nothrow: true }) === null) { pythonBin = "python" } - - this.python = replacePipEnvPathVar(pythonBin, venvPath) + this.python = pythonBin const childProcess = super.spawn(this.python, ["-m", this.getPyLs()], { cwd: projectPath,