diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c645c3e..b159bdb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ repos: exclude_types: - zsh - repo: https://github.com/rhysd/actionlint - rev: v1.7.3 + rev: v1.7.4 hooks: - id: actionlint - repo: https://github.com/adrienverge/yamllint @@ -59,7 +59,7 @@ repos: hooks: - id: yamllint - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.18 hooks: - id: mdformat additional_dependencies: @@ -79,16 +79,16 @@ repos: additional_dependencies: - markdown-it-texmath - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.9.0-1 + rev: v3.10.0-1 hooks: - id: shfmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.7.2 hooks: - id: ruff - id: ruff-format - repo: https://github.com/kumaraditya303/mirrors-pyright - rev: v1.1.383 + rev: v1.1.387 hooks: - id: pyright diff --git a/src/termux_language_server/misc/ebuild.py b/src/termux_language_server/misc/ebuild.py index 1c022cd..48b36dc 100644 --- a/src/termux_language_server/misc/ebuild.py +++ b/src/termux_language_server/misc/ebuild.py @@ -50,8 +50,11 @@ def init_schema() -> dict[str, dict[str, Any]]: schema["properties"][name]["type"] = "string" else: schema["properties"][name]["const"] = 0 + eprefix = os.path.dirname(os.path.dirname(os.getenv("SHELL", ""))) path = ( - check_output(split("portageq get_repo_path / gentoo")).decode().strip() + check_output(split(f"portageq get_repo_path {eprefix} gentoo")) + .decode() + .strip() ) atom = f"({'|'.join(os.listdir(path))})" schema["properties"]["LICENSE"]["pattern"] = rf"{atom}(( |\n){atom})*"