From a7c65efc4557a1b9f1f3ea3e82c171db2bb8ebe3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 Jun 2022 21:08:58 +0530 Subject: [PATCH] Ensure local kitty is used in tests even when another kitty is present in the system PATH Fixes #5194 --- test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test.py b/test.py index 26e484507..42e69a264 100755 --- a/test.py +++ b/test.py @@ -35,6 +35,8 @@ def main() -> None: 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)) + launcher_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kitty', 'launcher') + path = f'{launcher_dir}{os.pathsep}{path}' with TemporaryDirectory() as tdir, env_vars( PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir, PATH=path, XDG_CONFIG_HOME=os.path.join(tdir, '.config'),