fix: repair dev modules and scoped release git trust
Some checks failed
Dependency Audit / dependency-audit (push) Has been cancelled
Security Audit / security-audit (push) Has been cancelled

This commit is contained in:
2026-07-29 20:54:58 +02:00
parent 3f9567af18
commit 1aea3e7c4f
11 changed files with 356 additions and 30 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
from pathlib import Path
import subprocess
from .git_state import collect_repository_snapshot
from .git_state import collect_repository_snapshot, scoped_git_command
from .repository_push import command_text, compact_output
from .workspace import load_repository_specs, resolve_repo_path, resolve_workspace_root
@@ -93,7 +93,12 @@ def sync_repositories(
def run(command: tuple[str, ...], *, cwd: Path) -> subprocess.CompletedProcess[str]:
effective_command = (
scoped_git_command(cwd, *command[1:])
if command and Path(command[0]).name == "git"
else command
)
try:
return subprocess.run(command, cwd=cwd, check=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120)
return subprocess.run(effective_command, cwd=cwd, check=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120)
except subprocess.TimeoutExpired as exc:
return subprocess.CompletedProcess(command, 124, exc.stdout or "", exc.stderr or "git fetch timed out")
return subprocess.CompletedProcess(effective_command, 124, exc.stdout or "", exc.stderr or "git fetch timed out")