summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2025-11-05 16:42:45 +0800
committer魏曹先生 <1992414357@qq.com>2025-11-05 16:42:45 +0800
commitac6dd5db0c3a0880f7dd3d5c303c19d078c2ad3b (patch)
treeb1291e3b307cb9816e7b1d0773bbbdc7639b2a65 /src/bin
parentbb980ee5d4ce9fe47f08fc120636ee9f5f66d54e (diff)
Update account switching error handling
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jv.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/jv.rs b/src/bin/jv.rs
index 508b561..9a46cdf 100644
--- a/src/bin/jv.rs
+++ b/src/bin/jv.rs
@@ -1009,7 +1009,10 @@ async fn jv_account_as(user_dir: UserDirectory, args: SetLocalWorkspaceAccountAr
return;
};
- local_cfg.set_current_account(member.id());
+ if let Err(_) = local_cfg.set_current_account(member.id()) {
+ eprintln!("{}", md(t!("jv.fail.account.as")));
+ return;
+ };
let Ok(_) = LocalConfig::write(&local_cfg).await else {
eprintln!("{}", t!("jv.fail.write_cfg").trim());