File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 11const cp = require ( "child_process" ) ;
2- const shellEnv = require ( "shell-env" ) ;
32const { shell } = require ( "electron" ) ;
43const { AutoLanguageClient } = require ( "atom-languageclient" ) ;
54
@@ -29,11 +28,10 @@ class PythonLanguageClient extends AutoLanguageClient {
2928 }
3029
3130 async startServerProcess ( projectPath ) {
32- // For some reason Atom only detects the correct env if started from the command line on Mac.
33- const env = process . platform === "darwin" ? await shellEnv ( ) : process . env ;
31+ await new Promise ( resolve => atom . whenShellEnvironmentLoaded ( resolve ) ) ;
32+
3433 const childProcess = cp . spawn ( atom . config . get ( "ide-python.pylsPath" ) , {
35- cwd : projectPath ,
36- env : env
34+ cwd : projectPath
3735 } ) ;
3836 childProcess . on ( "error" , err =>
3937 atom . notifications . addError (
Original file line number Diff line number Diff line change 1717 "atom" : " >=1.21.0 <2.0.0"
1818 },
1919 "dependencies" : {
20- "atom-languageclient" : " ^0.6.4" ,
21- "shell-env" : " ^0.3.0"
20+ "atom-languageclient" : " ^0.6.4"
2221 },
2322 "enhancedScopes" : [
2423 " source.python"
You can’t perform that action at this time.
0 commit comments