mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 18:44:27 +02:00
Propagate full PYTHONPATH only for Windows
This commit is contained in:
@@ -359,7 +359,11 @@ def copy_pythonpath_to_osenv():
|
||||
if "PYTHONPATH" in os.environ:
|
||||
_PYTHONPATH = os.environ.get("PYTHONPATH").split(os.pathsep)
|
||||
for p in os.sys.path:
|
||||
if p not in _PYTHONPATH:
|
||||
conditions = [p not in _PYTHONPATH]
|
||||
if "windows" not in get_systype():
|
||||
conditions.append(
|
||||
isdir(join(p, "click")) or isdir(join(p, "platformio")))
|
||||
if all(conditions):
|
||||
_PYTHONPATH.append(p)
|
||||
os.environ['PYTHONPATH'] = os.pathsep.join(_PYTHONPATH)
|
||||
|
||||
|
Reference in New Issue
Block a user