From 1df49780ba13f83f9a5ad0daf982dd16cec2d765 Mon Sep 17 00:00:00 2001 From: Jiri Kyjovsky Date: Wed, 12 Apr 2023 20:19:02 +0200 Subject: [PATCH] more logs for git cmd --- alpa/git.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/alpa/git.py b/alpa/git.py index 23d1021..b60cd5b 100644 --- a/alpa/git.py +++ b/alpa/git.py @@ -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, ) @@ -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(),