From a7f27a721ddcd0d3fc9c148f22cd5cb567b71d1a Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Mon, 17 Feb 2025 01:25:49 -0600 Subject: random changes --- ozone-cli/src/main.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ozone-cli/src') diff --git a/ozone-cli/src/main.rs b/ozone-cli/src/main.rs index d383cb7..81a44f9 100644 --- a/ozone-cli/src/main.rs +++ b/ozone-cli/src/main.rs @@ -300,6 +300,11 @@ async fn main_inner(cli: Cli) -> Result> { accounts.save(&accounts_path).await?; }, AccountCommand::SignIn(args) => { + if cli.offline { + eprintln!("This command cannot be used while offline."); + return Ok(ExitCode::FAILURE); + } + let (client_id, azure) = if args.use_alt_client_id { (ALT_CLIENT_ID, false) } else { @@ -386,6 +391,11 @@ async fn main_inner(cli: Cli) -> Result> { display_account(account, false, true); }, AccountCommand::Refresh => { + if cli.offline { + eprintln!("This command cannot be used while offline."); + return Ok(ExitCode::FAILURE); + } + let Some(account) = accounts.get_selected_account_mut() else { eprintln!("No account selected."); return Ok(ExitCode::FAILURE); @@ -424,8 +434,8 @@ async fn main_inner(cli: Cli) -> Result> { return Ok(ExitCode::FAILURE); }; - match account { - Account::MSA(msa_acct) => { + if !cli.offline { + if let Account::MSA(msa_acct) = account { let client = MsaAccount::create_client(); println!("Looking up account information..."); @@ -444,7 +454,6 @@ async fn main_inner(cli: Cli) -> Result> { accounts.save(&accounts_path).await?; } - _ => () // nothing to be done } println!("Preparing the game files..."); -- cgit v1.2.3-70-g09d2