From 07dc83670bf3de465680444dab114e8984628c4e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 16 Aug 2022 14:49:31 +0530 Subject: [PATCH] Fix go in home dir getting removed from PATH on CI --- test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test.py b/test.py index b3dfde59f..9dc16b745 100755 --- a/test.py +++ b/test.py @@ -26,10 +26,14 @@ def env_vars(**kw: str) -> Iterator[None]: def main() -> None: warnings.simplefilter('error') + gohome = os.path.expanduser('~/go') + go = shutil.which('go') 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') + if go: + path = f'{os.path.dirname(go)}{os.pathsep}{path}' path = f'{launcher_dir}{os.pathsep}{path}' PYTHON_FOR_TYPE_CHECK = shutil.which('python') or shutil.which('python3') or '' gohome = os.path.expanduser('~/go')