This commit is contained in:
Kovid Goyal 2018-06-22 15:35:24 +05:30
parent aba84581f5
commit c037f53534
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

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