mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-31 06:18:17 +00:00
Fix potential error when $PATH is not defined
When `PATH` is not in `os.environ`, kitty could potentially throw a `KeyError`.
This commit is contained in:
parent
54ca775006
commit
2d19b87208
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ def kitty_exe():
|
|||
if ans is None:
|
||||
rpath = sys._xoptions.get('bundle_exe_dir')
|
||||
if not rpath:
|
||||
items = os.environ['PATH'].split(os.pathsep)
|
||||
items = filter(None, os.environ.get('PATH', '').split(os.pathsep))
|
||||
seen = set()
|
||||
for candidate in items:
|
||||
if candidate not in seen:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue