From f7c7c9f473fcd6c30577004d760c2c80c330e8e3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Jul 2026 06:17:34 +0530 Subject: [PATCH] Ensure slangc is correct in test env --- kitty_tests/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty_tests/main.py b/kitty_tests/main.py index 030197874..6fab27cf0 100644 --- a/kitty_tests/main.py +++ b/kitty_tests/main.py @@ -298,6 +298,7 @@ def env_vars(**kw: str) -> Iterator[None]: @contextmanager def env_for_python_tests(report_env: bool = False) -> Iterator[None]: gohome = os.path.expanduser('~/go') + slangc = os.environ.get('SLANGC') or shutil.which('slangc') or 'slangc' 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)) @@ -319,6 +320,7 @@ def env_for_python_tests(report_env: bool = False) -> Iterator[None]: USERPROFILE=tdir, PATH=path, TERM='xterm-kitty', + SLANGC=slangc, 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'),