fix(simulation): scope worker git ownership checks

This commit is contained in:
DCCONSTRUCTIONS 2026-07-24 17:20:10 +03:00
parent c9b1009259
commit fc5cbdff8a
1 changed files with 11 additions and 1 deletions

View File

@ -90,7 +90,17 @@ def _package_version(package: str) -> str:
def _git_commit(path: Path) -> str: def _git_commit(path: Path) -> str:
commit = _run(["git", "-C", str(path), "rev-parse", "HEAD"]) commit = _run(
[
"git",
"-c",
f"safe.directory={path}",
"-C",
str(path),
"rev-parse",
"HEAD",
]
)
if re.fullmatch(r"[a-f0-9]{40}", commit) is None: if re.fullmatch(r"[a-f0-9]{40}", commit) is None:
raise EvidenceError(f"invalid Git commit at {path}: {commit!r}") raise EvidenceError(f"invalid Git commit at {path}: {commit!r}")
return commit return commit