MCPcopy Index your code
hub / github.com/SkyworkAI/DeepResearchAgent / _run_git_command

Method _run_git_command

src/benchmark/leetcode.py:222–234  ·  view source on GitHub ↗

Run git command asynchronously

(self, args: List[str], cwd: str)

Source from the content-addressed store, hash-verified

220 raise Exception(f"| ❌ Failed to clone repository: {str(e)}")
221
222 async def _run_git_command(self, args: List[str], cwd: str) -> str:
223 """Run git command asynchronously"""
224 process = await asyncio.create_subprocess_exec(
225 'git', *args,
226 cwd=cwd,
227 stdout=asyncio.subprocess.PIPE,
228 stderr=asyncio.subprocess.PIPE
229 )
230 stdout, stderr = await process.communicate()
231 if process.returncode != 0:
232 error_msg = stderr.decode().strip() or stdout.decode().strip()
233 raise Exception(f"Git command failed (exit {process.returncode}): {error_msg}")
234 return stdout.decode().strip()
235
236 async def _setup_leetcode_cookie(self):
237 """Use Playwright to login and extract cookies to bypass Cloudflare 403"""

Callers 3

_setup_git_repoMethod · 0.95
batch_pushMethod · 0.95
submit_codeMethod · 0.95

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected