mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Use r.unwrap()
This commit is contained in:
parent
a41eac2e25
commit
ccb23690b7
1 changed files with 1 additions and 17 deletions
18
src/main.rs
18
src/main.rs
|
@ -40,23 +40,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
|
||||||
let config = matches.value_of("config").unwrap_or("~/.taskrc");
|
let config = matches.value_of("config").unwrap_or("~/.taskrc");
|
||||||
let r = tui_main(config);
|
let r = tui_main(config);
|
||||||
match r {
|
Ok(r.unwrap())
|
||||||
Ok(_) => std::process::exit(0),
|
|
||||||
Err(error) => {
|
|
||||||
if error.to_string().to_lowercase().contains("no such file or directory") {
|
|
||||||
eprintln!(
|
|
||||||
"{}: Unable to find executable `task`: {}. Check that taskwarrior is install correctly and try again.",
|
|
||||||
"[taskwarrior-tui error]", error
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
eprintln!(
|
|
||||||
"{}: {}. Please report as a github issue on https://github.com/kdheepak/taskwarrior-tui",
|
|
||||||
"[taskwarrior-tui error]", error
|
|
||||||
);
|
|
||||||
}
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn tui_main(_config: &str) -> Result<(), Box<dyn Error>> {
|
fn tui_main(_config: &str) -> Result<(), Box<dyn Error>> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue