From 8dd10c9b29fc0e3d204c39a75cf02d394186b4ca Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sun, 19 Jun 2022 12:16:20 -0400 Subject: [PATCH] move debug subcommand impl --- src/main.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index a6c64d5..8de98f1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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: ");