summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-timetrack/src/shell.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-08 12:06:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-08 12:06:42 +0100
commitcb9f6e7f46eb1a05071947d5f28bb1fe45313734 (patch)
tree6e5a8e08e5b204f202de335d412de3f69196ce12 /bin/domain/imag-timetrack/src/shell.rs
parent00aa4df88edae1d5eeb3fb365af05f95bd0de3b4 (diff)
parent666193dfc26181b6606cb85de5389c4ed6ece5eb (diff)
Merge branch 'replace-failure-with-anyhow'
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/domain/imag-timetrack/src/shell.rs')
-rw-r--r--bin/domain/imag-timetrack/src/shell.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/domain/imag-timetrack/src/shell.rs b/bin/domain/imag-timetrack/src/shell.rs
index 5a888d8b..f4dde8d9 100644
--- a/bin/domain/imag-timetrack/src/shell.rs
+++ b/bin/domain/imag-timetrack/src/shell.rs
@@ -21,9 +21,9 @@ use std::env;
use std::process::Command;
use filters::filter::Filter;
-use failure::Fallible as Result;
-use failure::err_msg;
-use failure::Error;
+use anyhow::Result;
+
+use anyhow::Error;
use resiter::Filter as RFilter;
use resiter::AndThen;
@@ -60,10 +60,10 @@ pub fn shell(rt: &Runtime) -> Result<()> {
.map(mkshell)
.map_err(|e| match e {
env::VarError::NotPresent => {
- err_msg("No $SHELL variable in environment, cannot work!")
+ anyhow!("No $SHELL variable in environment, cannot work!")
},
env::VarError::NotUnicode(_) => {
- err_msg("SHELL variable is not unicode, cannot work!")
+ anyhow!("SHELL variable is not unicode, cannot work!")
}
})
}
@@ -75,7 +75,7 @@ pub fn shell(rt: &Runtime) -> Result<()> {
}
if !shellcmd.status()?.success() {
- return Err(format_err!("Failed to execute {:?}", shellcmd))
+ return Err(anyhow!("Failed to execute {:?}", shellcmd))
}
let stop = ::chrono::offset::Local::now().naive_local();
let filter = has_one_of_tags(&tags);