Skip to content

Commit

Permalink
Use the logging module instead of prints
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaretnikov committed Dec 18, 2023
1 parent 1670999 commit 7f2dd1b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ def action_solve_lockfile(
json.dump(specification.dict(), f)

def print_cmd(cmd):
print(f"Running command: {' '.join(cmd)}")
print(subprocess.check_output(cmd, stderr=subprocess.STDOUT, encoding="utf-8"))
context.log.info(f"Running command: {' '.join(cmd)}")
context.log.info(
subprocess.check_output(cmd, stderr=subprocess.STDOUT, encoding="utf-8")
)

# The info command can be used with either mamba or conda
print_cmd([conda_command, "info"])
Expand Down

0 comments on commit 7f2dd1b

Please sign in to comment.