Don't copy the environment to update it

This causes problems on windows, and is wasteful anyway. The subprocess
will pick up the environment from its parent.
This commit is contained in:
Ben Jackson 2020-12-05 16:38:27 +00:00
commit 8261cde3c9
5 changed files with 38 additions and 14 deletions

View file

@ -740,11 +740,7 @@ class DebugSession( object ):
self._connection_type = self._api_prefix + self._connection_type
# TODO: Do we actually need to copy and update or does Vim do that?
env = os.environ.copy()
if 'env' in self._adapter:
env.update( self._adapter[ 'env' ] )
self._adapter[ 'env' ] = env
self._adapter[ 'env' ] = self._adapter.get( 'env', {} )
if 'cwd' not in self._adapter:
self._adapter[ 'cwd' ] = os.getcwd()