Skip to content

Commit 657a661

Browse files
committed
🩹 Fix bug of portageq on gentoo prefix
1 parent 91298e4 commit 657a661

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ repos:
5151
exclude_types:
5252
- zsh
5353
- repo: https://github.com/rhysd/actionlint
54-
rev: v1.7.3
54+
rev: v1.7.4
5555
hooks:
5656
- id: actionlint
5757
- repo: https://github.com/adrienverge/yamllint
5858
rev: v1.35.1
5959
hooks:
6060
- id: yamllint
6161
- repo: https://github.com/executablebooks/mdformat
62-
rev: 0.7.17
62+
rev: 0.7.18
6363
hooks:
6464
- id: mdformat
6565
additional_dependencies:
@@ -79,16 +79,16 @@ repos:
7979
additional_dependencies:
8080
- markdown-it-texmath
8181
- repo: https://github.com/scop/pre-commit-shfmt
82-
rev: v3.9.0-1
82+
rev: v3.10.0-1
8383
hooks:
8484
- id: shfmt
8585
- repo: https://github.com/astral-sh/ruff-pre-commit
86-
rev: v0.6.9
86+
rev: v0.7.2
8787
hooks:
8888
- id: ruff
8989
- id: ruff-format
9090
- repo: https://github.com/kumaraditya303/mirrors-pyright
91-
rev: v1.1.383
91+
rev: v1.1.387
9292
hooks:
9393
- id: pyright
9494

src/termux_language_server/misc/ebuild.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ def init_schema() -> dict[str, dict[str, Any]]:
5050
schema["properties"][name]["type"] = "string"
5151
else:
5252
schema["properties"][name]["const"] = 0
53+
eprefix = os.path.dirname(os.path.dirname(os.getenv("SHELL", "")))
5354
path = (
54-
check_output(split("portageq get_repo_path / gentoo")).decode().strip()
55+
check_output(split(f"portageq get_repo_path {eprefix} gentoo"))
56+
.decode()
57+
.strip()
5558
)
5659
atom = f"({'|'.join(os.listdir(path))})"
5760
schema["properties"]["LICENSE"]["pattern"] = rf"{atom}(( |\n){atom})*"

0 commit comments

Comments
 (0)