From 85c4662a61a0cf241b32dab15aec6bd248a54bf3 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Mon, 5 Dec 2022 09:18:38 -0500 Subject: [PATCH] remove username argument from ArgsSetup because it was causing problems --- src/cli.rs | 5 +---- src/main.rs | 10 ++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 30c2710..c9bd25b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -116,10 +116,7 @@ pub(crate) struct ArgsCompletions { #[derive(Debug, Clone, Parser)] #[clap(about = "Set up a new account with steamguard-cli")] -pub(crate) struct ArgsSetup { - #[clap(short, long, from_global, help = "Steam username, case-sensitive.")] - pub username: Option, -} +pub(crate) struct ArgsSetup {} #[derive(Debug, Clone, Parser)] #[clap(about = "Import an account with steamguard already set up")] diff --git a/src/main.rs b/src/main.rs index cb5bcee..403c547 100644 --- a/src/main.rs +++ b/src/main.rs @@ -349,18 +349,12 @@ fn do_subcmd_completion(args: cli::ArgsCompletions) -> Result<(), anyhow::Error> } fn do_subcmd_setup( - args: cli::ArgsSetup, + _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: "); - let username = if args.username.is_some() { - let u = args.username.unwrap(); - println!("{}", u); - u - } else { - tui::prompt() - }; + let username = tui::prompt(); let account_name = username.clone(); if manifest.account_exists(&username) { bail!(