Skip to content

Commit 5789f41

Browse files
committed
fix: fix replacing $PIPENV_PATH in the python path
1 parent 768c6bc commit 5789f41

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/main.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ class PythonLanguageClient extends AutoLanguageClient {
7979
}
8080

8181
let pythonBin = atom.config.get("ide-python.python") || "python3"
82+
83+
// replace $PIPENV_PATH in the path
84+
pythonBin = replacePipEnvPathVar(pythonBin, venvPath)
85+
86+
// check if it exists
8287
if (whichSync(pythonBin, { nothrow: true }) === null) {
8388
pythonBin = "python"
8489
}
85-
86-
this.python = replacePipEnvPathVar(pythonBin, venvPath)
90+
this.python = pythonBin
8791

8892
const childProcess = super.spawn(this.python, ["-m", this.getPyLs()], {
8993
cwd: projectPath,

0 commit comments

Comments
 (0)