Skip to content

Commit

Permalink
Enable print run_command on request (#72)
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek authored Jul 1, 2024
1 parent ca8c17d commit 8042bcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion container_ci_suite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def run_command(
return_output: bool = True,
ignore_error: bool = False,
shell: bool = True,
debug: bool = False,
**kwargs,
):
"""
Expand All @@ -148,9 +149,11 @@ def run_command(
:param return_output: bool, return output of the command
:param ignore_error: bool, do not fail in case nonzero return code
:param shell: bool, run command in shell
:param debug: bool, print command in shell, default is suppressed
:return: None or str
"""
logger.debug(f"command: {cmd}")
if debug:
logger.debug(f"command: {cmd}")
try:
if return_output:
return subprocess.check_output(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_requirements():
description='A python3 container CI tool for testing images.',
long_description=long_description,
long_description_content_type='text/markdown',
version="0.2.2",
version="0.2.3",
keywords='tool,containers,images,tests',
packages=find_packages(exclude=["tests"]),
url="https://github.com/sclorg/container-ci-suite",
Expand Down

0 comments on commit 8042bcd

Please sign in to comment.