Fix git safe.directory for mounted /repo in Docker

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-06 22:43:09 +03:00
parent c1aac7ecac
commit d10f25eb06
3 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -26,8 +26,9 @@ def run_git(args, timeout=120):
if not _repo_ready():
return False, f"Git-репозиторий не найден: {get_repo_path()}"
repo = get_repo_path()
result = subprocess.run(
["git", "-C", get_repo_path()] + args,
["git", "-c", f"safe.directory={repo}", "-C", repo] + args,
capture_output=True,
text=True,
timeout=timeout,