#902: Use os.pathsep to split PATH env var (#917)

Fix #902
This commit is contained in:
Pablo Aguiar
2019-05-21 20:47:47 +02:00
committed by Vladimir Iakovlev
parent 40ab4eb62d
commit 78ef9eec88
2 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ def get_all_executables():
tf_entry_points = ['thefuck', 'fuck']
bins = [exe.name.decode('utf8') if six.PY2 else exe.name
for path in os.environ.get('PATH', '').split(':')
for path in os.environ.get('PATH', '').split(os.pathsep)
for exe in _safe(lambda: list(Path(path).iterdir()), [])
if not _safe(exe.is_dir, True)
and exe.name not in tf_entry_points]