fix cli invocations in gui entrypoint

This commit is contained in:
Joseph Montanaro 2024-07-14 20:51:49 -04:00
parent cab5ec40cc
commit 27c2f467c4

View File

@ -11,14 +11,15 @@ use creddy::{
fn main() { fn main() {
let res = match cli::parser().get_matches().subcommand() { let global_matches = cli::parser().get_matches();
let res = match global_matches.subcommand() {
None | Some(("run", _)) => { None | Some(("run", _)) => {
app::run().error_popup("Creddy encountered an error"); app::run().error_popup("Creddy encountered an error");
Ok(()) Ok(())
}, },
Some(("get", m)) => cli::get(m), Some(("get", m)) => cli::get(m, &global_matches),
Some(("exec", m)) => cli::exec(m), Some(("exec", m)) => cli::exec(m, &global_matches),
Some(("shortcut", m)) => cli::invoke_shortcut(m), Some(("shortcut", m)) => cli::invoke_shortcut(m, &global_matches),
_ => unreachable!(), _ => unreachable!(),
}; };