diff --git a/builder/utils.py b/builder/utils.py index 7bf423c9..d9f82805 100644 --- a/builder/utils.py +++ b/builder/utils.py @@ -1,5 +1,6 @@ """Some utils for builder.""" +import inspect import os import subprocess import sys @@ -41,6 +42,21 @@ def run_command( timeout: int | None = None, ) -> None: """Implement subprocess.run but handle timeout different.""" + stack = inspect.stack() + print( + f"::group::" + f"{Path(*Path(stack[1].filename).parts[-2:])}:{stack[1].function}" + " => " + f"{Path(*Path(stack[0].filename).parts[-2:])}:{stack[0].function}" + "\n" + f"subprocess.run(\n" + f" cmd={cmd},\n" + f" env={'***' if env else env},\n" + f" timeout={timeout}\n" + f")\n" + f"::endgroup::\n", + ) + subprocess.run( # noqa: S602 cmd, shell=True,