Otherwise our PATH changes in check() are not picked up. This reverts https://github.com/kovidgoyal/kitty/commit/595698d8e95094b5fa439e24eddad4785aae7d07 diff -upr kitty-0.24.3.orig/test.py kitty-0.24.3/test.py --- kitty-0.24.3.orig/test.py 2022-03-17 18:09:39.534990823 +0100 +++ kitty-0.24.3/test.py 2022-03-17 18:09:58.901720971 +0100 @@ -32,11 +32,8 @@ def init_env() -> None: def main() -> None: warnings.simplefilter('error') - current_home = os.path.expanduser('~') + os.sep - paths = os.environ.get('PATH', '/usr/local/sbin:/usr/local/bin:/usr/bin').split(os.pathsep) - path = os.pathsep.join(x for x in paths if not x.startswith(current_home)) with TemporaryDirectory() as tdir, env_vars( - PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir, PATH=path, + PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir, XDG_CONFIG_HOME=os.path.join(tdir, '.config'), XDG_CONFIG_DIRS=os.path.join(tdir, '.config'), XDG_DATA_DIRS=os.path.join(tdir, '.local', 'xdg'),