2023-05-06 16:56:45 -07:00
|
|
|
#![cfg_attr(
|
|
|
|
all(not(debug_assertions), target_os = "windows"),
|
|
|
|
windows_subsystem = "windows"
|
|
|
|
)]
|
|
|
|
|
2023-05-15 13:09:26 -07:00
|
|
|
use creddy::{
|
|
|
|
app,
|
|
|
|
cli,
|
|
|
|
errors::ErrorPopup,
|
|
|
|
};
|
2023-04-30 10:52:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2023-05-06 12:01:56 -07: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-22 16:36:32 -08:00
|
|
|
}
|