diff --git a/crates/ptth_server/src/bin/ptth_server.rs b/crates/ptth_server/src/bin/ptth_server.rs index 06eeaea..a069c0a 100644 --- a/crates/ptth_server/src/bin/ptth_server.rs +++ b/crates/ptth_server/src/bin/ptth_server.rs @@ -4,5 +4,7 @@ async fn main () -> anyhow::Result <()> { tracing_subscriber::fmt::init (); - ptth_server::executable::main ().await + let args = std::env::args_os (); + + ptth_server::executable::main (args).await } diff --git a/crates/ptth_server/src/lib.rs b/crates/ptth_server/src/lib.rs index 25f8d61..0d3455c 100644 --- a/crates/ptth_server/src/lib.rs +++ b/crates/ptth_server/src/lib.rs @@ -490,8 +490,8 @@ pub mod executable { prelude::*, }; - pub async fn main () -> anyhow::Result <()> { - let opt = Opt::from_args (); + pub async fn main (args: std::env::ArgsOs) -> anyhow::Result <()> { + let opt = Opt::from_iter (args); let asset_root = opt.asset_root; let path = opt.config_path.clone ().unwrap_or_else (|| PathBuf::from ("./config/ptth_server.toml"));