Skip to content

Commit

Permalink
Colour stderr the same as stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
layday authored and gaborbernat committed Mar 5, 2024
1 parent 9ea9da7 commit 0cbca17
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/build/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ def _log(message: str, *, origin: tuple[str, ...] | None = None) -> None:

elif origin[0] == 'subprocess':
initial_indent = '> ' if origin[1] == 'cmd' else '< '
color = '{red}' if origin[1] == 'stderr' else '{dim}'
file = sys.stderr if origin[1] == 'stderr' else None
for line in message.splitlines():
_cprint(color + '{}{reset}', _fill(line, initial_indent=initial_indent), file=file)
_cprint('{dim}{}{reset}', _fill(line, initial_indent=initial_indent), file=file)


def _setup_cli(*, verbosity: int) -> None:
Expand Down

0 comments on commit 0cbca17

Please sign in to comment.