fix some output messages

This commit is contained in:
Abraham Toriz 2022-08-26 12:33:56 -04:00
parent f980bb89b5
commit 8420e7f776
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
5 changed files with 6 additions and 5 deletions

View File

@ -175,7 +175,7 @@ mod tests {
assert_eq!(e.sheet, "default".to_owned()); assert_eq!(e.sheet, "default".to_owned());
assert_eq!(&String::from_utf8_lossy(&streams.out), "Checked into sheet \"default\".\n"); assert_eq!(&String::from_utf8_lossy(&streams.out), "Checked into sheet \"default\".\n");
assert_eq!(&String::from_utf8_lossy(&streams.err), assert_eq!(&String::from_utf8_lossy(&streams.err),
"[WARNING] You are using the old timetrap format, it is advised that \ "[WARNING] You are using the old timetrap format, it is advised that \
you update your database using t migrate\n"); you update your database using t migrate\n");
} }

View File

@ -213,7 +213,7 @@ which where taken from your config file located at
{config_at} {config_at}
Perhaps is mispelled?", format_paths(.paths))] Perhaps it is mispelled?", format_paths(.paths))]
FormatterNotFound { FormatterNotFound {
name: String, name: String,
paths: Vec<PathBuf>, paths: Vec<PathBuf>,

View File

@ -185,7 +185,7 @@ are you sure you want to delete entry {id} with note
\"{note}\" \"{note}\"
{duration})"))? { {duration}?"))? {
streams.db.delete_entry_by_id(entry.id)?; streams.db.delete_entry_by_id(entry.id)?;
writeln!(streams.out, "Gone")?; writeln!(streams.out, "Gone")?;
} else { } else {

View File

@ -80,7 +80,7 @@ fn error_trap(matches: ArgMatches) -> error::Result<()> {
} }
fn main() { fn main() {
// Lets first declar some args that repeat here and there // Let's first declare some args that repeat here and there
let start_arg = Arg::with_name("start") let start_arg = Arg::with_name("start")
.long("start").short("s") .long("start").short("s")
.takes_value(true).value_name("TIME") .takes_value(true).value_name("TIME")

View File

@ -78,7 +78,8 @@ pub fn warn_if_needed<E: Write>(err: &mut E, needs_warning: bool, env: &Env) ->
writeln!( writeln!(
err, err,
"{} You are using the old timetrap format, it is advised that \ "{} You are using the old timetrap format, it is advised that \
you update your database using t migrate", you update your database using t migrate. To supress this warning \
set TIEMPO_SUPRESS_TIMETRAP_WARNING=1",
if env.stderr_is_tty { if env.stderr_is_tty {
Yellow.bold().paint("[WARNING]") Yellow.bold().paint("[WARNING]")
} else { } else {