Move cache age warning to stderr (#114)

Fixes #113
This commit is contained in:
michaeldel 2020-04-16 21:42:02 +02:00 committed by GitHub
commit a45c19647f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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\

View file

@ -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]