fix some output messages
This commit is contained in:
parent
f980bb89b5
commit
8420e7f776
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>,
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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")
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue