2023-05-06 19:01:56 +00:00
|
|
|
mod app;
|
|
|
|
mod cli;
|
2022-12-21 21:42:12 +00:00
|
|
|
mod config;
|
2023-05-06 19:01:56 +00:00
|
|
|
mod credentials;
|
2022-11-29 00:16:33 +00:00
|
|
|
mod errors;
|
2022-12-04 05:47:09 +00:00
|
|
|
mod clientinfo;
|
2022-11-29 00:16:33 +00:00
|
|
|
mod ipc;
|
|
|
|
mod state;
|
|
|
|
mod server;
|
2022-12-21 22:49:01 +00:00
|
|
|
mod tray;
|
2022-08-14 20:27:41 +00:00
|
|
|
|
2023-04-28 21:33:04 +00:00
|
|
|
|
2023-05-06 19:01:56 +00:00
|
|
|
use crate::errors::ErrorPopup;
|
2023-04-30 17:52:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2023-05-06 19:01:56 +00:00
|
|
|
let res = match cli::parser().get_matches().subcommand() {
|
|
|
|
None | Some(("run", _)) => {
|
|
|
|
app::run().error_popup("Creddy failed to start");
|
|
|
|
Ok(())
|
|
|
|
},
|
|
|
|
Some(("show", m)) => cli::show(m),
|
|
|
|
Some(("exec", m)) => cli::exec(m),
|
|
|
|
_ => unreachable!(),
|
|
|
|
};
|
|
|
|
|
|
|
|
if let Err(e) = res {
|
|
|
|
eprintln!("Error: {e}");
|
|
|
|
}
|
2022-12-23 00:36:32 +00:00
|
|
|
}
|