Skip to content

Commit

Permalink
Indicate capture of stdout with arrow direction
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n committed Nov 9, 2021
1 parent 8c753ae commit fc73eac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion poethepoet/task/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,10 @@ def _print_action(self, action: str, dry: bool):
Print the action taken by a task just before executing it.
"""
min_verbosity = -1 if dry else 0
self._ui.print_msg(f"<hl>Poe =></hl> <action>{action}</action>", min_verbosity)
arrow = "<=" if self.options.get("capture_stdout") else "=>"
self._ui.print_msg(
f"<hl>Poe {arrow}</hl> <action>{action}</action>", min_verbosity
)

class Error(Exception):
pass
4 changes: 2 additions & 2 deletions tests/test_graph_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ def test_call_attr_func(run_poe_subproc):
assert result.capture == (
"Poe => echo here we go...\n"
"Poe => :\n"
"Poe => echo about\n"
"Poe => echo hello\n"
"Poe <= echo about\n"
"Poe <= echo hello\n"
"Poe => echo Thinking about and\n"
"Poe => echo hello and hello\n"
)
Expand Down

0 comments on commit fc73eac

Please sign in to comment.