From ec895378ee7f81347e082107206e141d5b8dd932 Mon Sep 17 00:00:00 2001 From: wayne warren Date: Fri, 13 Jun 2025 19:13:07 -0600 Subject: [PATCH] chore: support passing args explicitly to influxdb3_lib::startup --- influxdb3/src/lib.rs | 4 ++-- influxdb3/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/influxdb3/src/lib.rs b/influxdb3/src/lib.rs index 714884d7c4..2244ddea77 100644 --- a/influxdb3/src/lib.rs +++ b/influxdb3/src/lib.rs @@ -109,7 +109,7 @@ enum Command { Write(commands::write::Config), } -pub fn startup() -> Result<(), std::io::Error> { +pub fn startup(args: Vec) -> Result<(), std::io::Error> { #[cfg(unix)] install_crash_handler(); // attempt to render a useful stacktrace to stderr @@ -133,7 +133,7 @@ pub fn startup() -> Result<(), std::io::Error> { TokioDatafusionConfig::copy_deprecated_env_aliases(); // Note the help code above *must* run before this function call - let config = Config::parse(); + let config = Config::parse_from(args); let tokio_runtime = config.runtime_config.builder()?.build()?; diff --git a/influxdb3/src/main.rs b/influxdb3/src/main.rs index ca53b6a0ac..ae8eeb08f1 100644 --- a/influxdb3/src/main.rs +++ b/influxdb3/src/main.rs @@ -1,5 +1,5 @@ use influxdb3_lib::startup; fn main() -> Result<(), std::io::Error> { - startup() + startup(std::env::args().collect()) }