Fixes #1406
This commit is contained in:
Kovid Goyal 2019-02-23 15:31:57 +05:30
commit 27ffed5a1a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -24,8 +24,11 @@ def kitty_exe():
if ans is None:
rpath = getattr(sys, 'bundle_exe_dir', None)
if not rpath:
items = frozenset(os.environ['PATH'].split(os.pathsep))
items = os.environ['PATH'].split(os.pathsep)
seen = set()
for candidate in items:
if candidate not in seen:
seen.add(candidate)
if os.access(os.path.join(candidate, 'kitty'), os.X_OK):
rpath = candidate
break