Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit parent environment in subprocesses #2475

Closed
wants to merge 1 commit into from

Conversation

hovsater
Copy link
Contributor

This ensures that the language servers inherit the parent environment, retaining access to essential system variables while allowing for specific overrides.

This ensures that the language servers inherit the parent environment,
retaining access to essential system variables while allowing for
specific overrides.
@hovsater
Copy link
Contributor Author

I might have opened up this pull request prematurely as it looks like this is already being done:

LSP/plugin/core/types.py

Lines 824 to 831 in 68c7031

env = os.environ.copy()
for key, value in self.env.items():
if isinstance(value, list):
value = os.path.pathsep.join(value)
if key == 'PATH':
env[key] = sublime.expand_variables(value, variables) + os.path.pathsep + env[key]
else:
env[key] = sublime.expand_variables(value, variables)

@hovsater hovsater closed this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant