Skip to content

Commit

Permalink
Add short message on finished command
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Aug 8, 2024
1 parent d2b70ba commit 596c195
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions github_app_geo_project/module/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,17 @@ async def run_timeout(
start = datetime.datetime.now()
try:
async with asyncio.timeout(timeout):
async_proc = await asyncio.create_subprocess_exec(
*command,
cwd=cwd or get_cwd(),
env=env,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
stdout, stderr = await async_proc.communicate()
try:
async_proc = await asyncio.create_subprocess_exec(
*command,
cwd=cwd or get_cwd(),
env=env,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
stdout, stderr = await async_proc.communicate()
finally:
_LOGGER.debug("Command %s finished", shlex.join(command))
assert async_proc.returncode is not None
message: Message = AnsiProcessMessage(
command, async_proc.returncode, stdout.decode(), stderr.decode()
Expand Down

0 comments on commit 596c195

Please sign in to comment.