added wizard warning about google passwords

This commit is contained in:
Clément DOUIN
2024-02-04 11:36:11 +01:00
parent a945e1bf2f
commit 35c1453863
3 changed files with 16 additions and 2 deletions
+10 -1
View File
@@ -13,9 +13,9 @@ use email_address::EmailAddress;
use crate::backend::{self, config::BackendConfig, BackendKind};
#[cfg(feature = "message-send")]
use crate::message::config::{MessageConfig, MessageSendConfig};
use crate::ui::THEME;
#[cfg(feature = "account-sync")]
use crate::wizard_prompt;
use crate::{ui::THEME, wizard_warn};
use super::TomlAccountConfig;
@@ -63,6 +63,15 @@ pub(crate) async fn configure() -> Result<Option<(String, TomlAccountConfig)>> {
let autoconfig = autoconfig.await?;
let autoconfig = autoconfig.as_ref();
if let Some(config) = autoconfig {
if config.is_gmail() {
println!();
wizard_warn!("Warning: Google passwords cannot be used directly, see:");
wizard_warn!("https://pimalaya.org/himalaya/cli/latest/configuration/gmail.html");
println!();
}
}
match backend::wizard::configure(&account_name, email, autoconfig).await? {
#[cfg(feature = "imap")]
Some(BackendConfig::Imap(imap_config)) => {