mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-20 11:07:38 +03:00
Fix go in home dir getting removed from PATH on CI
This commit is contained in:
parent
1429be3a19
commit
07dc83670b
4
test.py
4
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')
|
||||
|
Loading…
Reference in New Issue
Block a user