mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
commit
32eda6922c
2 changed files with 18 additions and 0 deletions
14
news/win_path.rst
Normal file
14
news/win_path.rst
Normal file
|
@ -0,0 +1,14 @@
|
|||
**Added:** None
|
||||
|
||||
**Changed:** None
|
||||
|
||||
**Deprecated:** None
|
||||
|
||||
**Removed:** None
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Fixed a bug on Windows which meant xonsh wasn't using PATH enrivonment variable but instead relying on a default
|
||||
value from the widnows registry.
|
||||
|
||||
**Security:** None
|
|
@ -794,6 +794,10 @@ class Env(cabc.MutableMapping):
|
|||
args = (os_environ,)
|
||||
for key, val in dict(*args, **kwargs).items():
|
||||
self[key] = val
|
||||
if ON_WINDOWS:
|
||||
path_key = next((k for k in self._d if k.upper() == 'PATH'), None)
|
||||
if path_key:
|
||||
self['PATH'] = self._d.pop(path_key)
|
||||
if 'PATH' not in self._d:
|
||||
# this is here so the PATH is accessible to subprocs and so that
|
||||
# it can be modified in-place in the xonshrc file
|
||||
|
|
Loading…
Add table
Reference in a new issue