Skip to content

Commit

Permalink
more logs for git cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Apr 12, 2023
1 parent dabc11e commit 1df4978
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions alpa/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ def git_cmd(
stderr=asyncio.subprocess.PIPE,
cwd=context,
)
stdout = process.stdout.decode()
stderr = process.stderr.decode()
logger.debug(
f"git cmd results: stdout: {stdout}; stderr: {stderr}; "
f"retval: {process.returncode}"
)
return GitCmdResult(
stdout=process.stdout.decode().strip(),
stderr=process.stderr.decode().strip(),
stdout=stdout.strip(),
stderr=stderr.strip(),
retval=process.returncode,
)

Expand All @@ -69,6 +75,10 @@ async def async_git_cmd(
cwd=context,
)
stdout, stderr = await async_subprocess.communicate()
logger.debug(
f"async git cmd results: stdout: {stdout.decode()}; "
f"stderr: {stderr.decode()}; retval: {async_subprocess.returncode}"
)
return GitCmdResult(
stdout=stdout.decode().strip(),
stderr=stderr.decode().strip(),
Expand Down

0 comments on commit 1df4978

Please sign in to comment.