Skip to content

Commit

Permalink
fix: fix replacing $PIPENV_PATH in the python path
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Aug 24, 2021
1 parent 768c6bc commit 5789f41
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5789f41

Please sign in to comment.