diff --git a/docs/changelog.rst b/docs/changelog.rst index fdfa0dc3f..29fd0020e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -15,6 +15,8 @@ Changelog - macOS: Fix dragging kitty window tabs in traditional full screen mode causing crashes (:iss:`1296`) +- macOS: Ensure that when running from a bundle, the bundle kitty exe is + preferred over any kitty in PATH (:iss:`1280`) 0.13.2 [2019-01-04] ------------------------------ diff --git a/kitty/main.py b/kitty/main.py index 97ad663af..d4c505d42 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -231,7 +231,7 @@ def _main(): rpath = os.path.dirname(kitty_exe()) items = frozenset(os.environ['PATH'].split(os.pathsep)) if rpath and rpath not in items: - os.environ['PATH'] += os.pathsep + rpath + os.environ['PATH'] = rpath + os.pathsep + os.environ.get('PATH', '') args = sys.argv[1:] if is_macos and os.environ.pop('KITTY_LAUNCHED_BY_LAUNCH_SERVICES', None) == '1':