diff --git a/src/main.rs b/src/main.rs index 77fd4e4d..38f646ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,7 +180,7 @@ fn check_cache(args: &Args) { if args.flag_quiet { return; } - println!( + eprintln!( "{}", Color::Yellow.paint(format!( "The cache hasn't been updated for more than {} days.\n\ diff --git a/tests/lib.rs b/tests/lib.rs index 3fc35ba4..810c9ece 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -165,14 +165,14 @@ fn test_quiet_old_cache() { .args(&["tldr"]) .assert() .success() - .stdout(contains("The cache hasn't been updated for more than ")); + .stderr(contains("The cache hasn't been updated for more than ")); testenv .command() .args(&["tldr", "--quiet"]) .assert() .success() - .stdout(contains("The cache hasn't been updated for more than ").not()); + .stderr(contains("The cache hasn't been updated for more than ").not()); } #[test]