Use sys._xoptions to pass bundle_exe_dir

This allows it to be used with the make app kitty bundle as well.
This makes it robust against launching in environments where
python3 is not on PATH. See #1280
This commit is contained in:
Kovid Goyal
2019-05-01 08:45:01 +05:30
parent a2f589be00
commit cab1ba4e50
2 changed files with 15 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ WindowGeometry = namedtuple('WindowGeometry', 'left top right bottom xnum ynum')
def kitty_exe():
ans = getattr(kitty_exe, 'ans', None)
if ans is None:
rpath = getattr(sys, 'bundle_exe_dir', None)
rpath = sys._xoptions.get('bundle_exe_dir')
if not rpath:
items = os.environ['PATH'].split(os.pathsep)
seen = set()