move debug subcommand impl

This commit is contained in:
Carson McManus 2022-06-19 12:16:20 -04:00
parent aaded51d38
commit 8dd10c9b29

View file

@ -150,10 +150,7 @@ fn run() -> anyhow::Result<()> {
match new_args.sub {
Some(cli::Subcommands::Debug(args)) => {
if args.demo_conf_menu {
demos::demo_confirmation_menu();
}
return Ok(());
return do_subcmd_debug(args);
},
// Subcommand::Completions{shell} => {
// // cli().gen_completions_to(
@ -413,6 +410,13 @@ fn get_mafiles_dir() -> String {
return paths[0].to_str().unwrap().into();
}
fn do_subcmd_debug(args: cli::ArgsDebug) -> anyhow::Result<()> {
if args.demo_conf_menu {
demos::demo_confirmation_menu();
}
return Ok(());
}
fn do_subcmd_setup(args: cli::ArgsSetup, manifest: &mut accountmanager::Manifest) -> anyhow::Result<()> {
println!("Log in to the account that you want to link to steamguard-cli");
print!("Username: ");