1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-03 15:03:22 +02:00

flashrom_tester: Only print color when stdout isatty

Add the atty crate as a dependency. Print log and report in color only
when isatty is true.

BUG=b:246250254
BRANCH=None
TEST=ssh dut flashrom_tester # no color
TEST=ssh -t dut flashrom_tester # color

Change-Id: Ia3cc527fb98e53eda6773622340cf10764df2cba
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
This commit is contained in:
Evan Benn
2022-11-07 16:48:14 +11:00
committed by Edward O'Callaghan
parent 065366dd27
commit 4df64d93a0
4 changed files with 57 additions and 25 deletions

View File

@ -14,6 +14,7 @@ name = "flashrom_tester"
required-features = ["cli"]
[dependencies]
atty = "0.2"
built = { version = "0.5", features = ["chrono"] }
chrono = { version = "0.4", optional = true }
clap = { version = "2.33", default-features = false, optional = true }