Skip to content

Commit

Permalink
Merge pull request #399 from atom-community/replace-py-env
Browse files Browse the repository at this point in the history
fix: fix replacing $PIPENV_PATH in the python path
  • Loading branch information
aminya authored Aug 24, 2021
2 parents 768c6bc + 5789f41 commit c65cdc0
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 c65cdc0

Please sign in to comment.