1
0
Fork 0
mirror of synced 2024-06-14 08:25:21 +12:00

write stderr instead of stdout for version info

This commit is contained in:
Nick Sweeting 2020-07-13 11:41:18 -04:00
parent 4c4b1e6a4b
commit d159e674e1

View file

@ -156,15 +156,15 @@ def log_cli_command(subcommand: str, subcommand_args: List[str], stdin: Optional
from ..config import VERSION, ANSI
cmd = ' '.join(('archivebox', subcommand, *subcommand_args))
stdin_hint = ' < /dev/stdin' if not stdin.isatty() else ''
print('{black}[i] [{now}] ArchiveBox v{VERSION}: {cmd}{stdin_hint}{reset}'.format(
stderr('{black}[i] [{now}] ArchiveBox v{VERSION}: {cmd}{stdin_hint}{reset}'.format(
now=datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
VERSION=VERSION,
cmd=cmd,
stdin_hint=stdin_hint,
**ANSI,
))
print('{black} > {pwd}{reset}'.format(pwd=pwd, **ANSI))
print()
stderr('{black} > {pwd}{reset}'.format(pwd=pwd, **ANSI))
stderr()
### Parsing Stage