Pass command args manually to cli entrypoint instead of parsing from environment

This commit is contained in:
bytedream 2024-03-10 13:28:18 +01:00
parent e3a7fd9246
commit 3bf2458774
2 changed files with 3 additions and 3 deletions

View file

@ -117,8 +117,8 @@ struct Verbosity {
quiet: bool, quiet: bool,
} }
pub async fn cli_entrypoint() { pub async fn main(args: &[String]) {
let mut cli: Cli = Cli::parse(); let mut cli: Cli = Cli::parse_from(args);
if cli.verbosity.verbose || cli.verbosity.quiet { if cli.verbosity.verbose || cli.verbosity.quiet {
if cli.verbosity.verbose && cli.verbosity.quiet { if cli.verbosity.verbose && cli.verbosity.quiet {

View file

@ -8,5 +8,5 @@ compile_error!("At least one tls feature must be activated");
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
crunchy_cli_core::cli_entrypoint().await crunchy_cli_core::main(&std::env::args().collect::<Vec<String>>()).await
} }