Add miette error reports

feature/lookup-installed
trivernis 2 years ago
parent 14ba587c2c
commit 980e9afb8b
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -14,7 +14,6 @@ path = "src/main.rs"
[dependencies] [dependencies]
clap = { version = "4.1.1", features = ["derive"] } clap = { version = "4.1.1", features = ["derive"] }
color-eyre = "0.6.2"
crossterm = "0.25.0" crossterm = "0.25.0"
dialoguer = "0.10.3" dialoguer = "0.10.3"
dirs = "4.0.0" dirs = "4.0.0"
@ -23,7 +22,7 @@ futures-util = "0.3.25"
indicatif = "0.17.3" indicatif = "0.17.3"
lazy_static = "1.4.0" lazy_static = "1.4.0"
libflate = "1.2.0" libflate = "1.2.0"
miette = "5.5.0" miette = { version = "5.5.0", features = ["fancy"] }
reqwest = { version = "0.11.14", features = ["json", "stream"] } reqwest = { version = "0.11.14", features = ["json", "stream"] }
semver = { version = "1.0.16", features = ["std", "serde"] } semver = { version = "1.0.16", features = ["std", "serde"] }
serde = { version = "1.0.152", features = ["derive"] } serde = { version = "1.0.152", features = ["derive"] }

@ -48,7 +48,7 @@ pub enum Error {
MapperError, MapperError,
), ),
#[error("The passed is invalid")] #[error("The passed version is invalid")]
Version( Version(
#[from] #[from]
#[diagnostic_source] #[diagnostic_source]

@ -6,8 +6,7 @@ use clap::Parser;
mod args; mod args;
#[tokio::main(flavor = "current_thread")] #[tokio::main(flavor = "current_thread")]
async fn main() -> color_eyre::eyre::Result<()> { async fn main() -> miette::Result<()> {
color_eyre::install().unwrap();
let args: Args = Args::parse(); let args: Args = Args::parse();
match args.commmand { match args.commmand {

Loading…
Cancel
Save