Skip to content

Commit c65cdc0

Browse files
authoredAug 24, 2021
Merge pull request #399 from atom-community/replace-py-env
fix: fix replacing $PIPENV_PATH in the python path
2 parents 768c6bc + 5789f41 commit c65cdc0

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)
Please sign in to comment.