isolate i686 windows with rust-platform-verifier

This commit is contained in:
Clément DOUIN
2024-11-26 07:31:35 +01:00
parent e17c2544f3
commit 065493ac7a
6 changed files with 244 additions and 239 deletions
+9 -9
View File
@@ -1,10 +1,10 @@
pub mod account;
pub mod cli;
pub mod completion;
pub mod config;
pub mod email;
pub mod folder;
pub mod manual;
// pub mod account;
// pub mod cli;
// pub mod completion;
// pub mod config;
// pub mod email;
// pub mod folder;
// pub mod manual;
#[doc(inline)]
pub use crate::email::{envelope, flag, message};
// #[doc(inline)]
// pub use crate::email::{envelope, flag, message};
+43 -39
View File
@@ -1,47 +1,51 @@
use clap::Parser;
use color_eyre::Result;
use himalaya::{
cli::Cli, config::TomlConfig, envelope::command::list::ListEnvelopesCommand,
message::command::mailto::MessageMailtoCommand,
};
use pimalaya_tui::terminal::{
cli::{printer::StdoutPrinter, tracing},
config::TomlConfig as _,
};
// use clap::Parser;
// use color_eyre::Result;
// use himalaya::{
// cli::Cli, config::TomlConfig, envelope::command::list::ListEnvelopesCommand,
// message::command::mailto::MessageMailtoCommand,
// };
// use pimalaya_tui::terminal::{
// cli::{printer::StdoutPrinter, tracing},
// config::TomlConfig as _,
// };
#[tokio::main]
async fn main() -> Result<()> {
let tracing = tracing::install()?;
// #[tokio::main]
// async fn main() -> Result<()> {
// let tracing = tracing::install()?;
#[cfg(feature = "keyring")]
secret::keyring::set_global_service_name("himalaya-cli");
// #[cfg(feature = "keyring")]
// secret::keyring::set_global_service_name("himalaya-cli");
// if the first argument starts by "mailto:", execute straight the
// mailto message command
let mailto = std::env::args()
.nth(1)
.filter(|arg| arg.starts_with("mailto:"));
// // if the first argument starts by "mailto:", execute straight the
// // mailto message command
// let mailto = std::env::args()
// .nth(1)
// .filter(|arg| arg.starts_with("mailto:"));
if let Some(ref url) = mailto {
let mut printer = StdoutPrinter::default();
let config = TomlConfig::from_default_paths().await?;
// if let Some(ref url) = mailto {
// let mut printer = StdoutPrinter::default();
// let config = TomlConfig::from_default_paths().await?;
return MessageMailtoCommand::new(url)?
.execute(&mut printer, &config)
.await;
}
// return MessageMailtoCommand::new(url)?
// .execute(&mut printer, &config)
// .await;
// }
let cli = Cli::parse();
let mut printer = StdoutPrinter::new(cli.output);
let res = match cli.command {
Some(cmd) => cmd.execute(&mut printer, cli.config_paths.as_ref()).await,
None => {
let config = TomlConfig::from_paths_or_default(cli.config_paths.as_ref()).await?;
ListEnvelopesCommand::default()
.execute(&mut printer, &config)
.await
}
};
// let cli = Cli::parse();
// let mut printer = StdoutPrinter::new(cli.output);
// let res = match cli.command {
// Some(cmd) => cmd.execute(&mut printer, cli.config_paths.as_ref()).await,
// None => {
// let config = TomlConfig::from_paths_or_default(cli.config_paths.as_ref()).await?;
// ListEnvelopesCommand::default()
// .execute(&mut printer, &config)
// .await
// }
// };
// tracing.with_debug_and_trace_notes(res)
// }
fn main() {
println!("Hello, world!");
tracing.with_debug_and_trace_notes(res)
}