kin: KIN-054 Исправить race condition в loadMode() при инициализации ProjectView

This commit is contained in:
Gros Frumos 2026-03-16 07:06:34 +02:00
parent ae21e48b65
commit 756f9e65ab
5 changed files with 47 additions and 10 deletions

View file

@ -47,9 +47,13 @@ def _build_claude_env() -> dict:
if bin_dir.is_dir():
extra.append(str(bin_dir))
seen = set(existing)
new_dirs = [d for d in extra if d and d not in seen]
env["PATH"] = ":".join(new_dirs + existing)
seen: set[str] = set()
deduped: list[str] = []
for d in extra + existing:
if d and d not in seen:
seen.add(d)
deduped.append(d)
env["PATH"] = ":".join(deduped)
return env