From 9ebca3023f8205359a85dbbe03bfab6b8c996d4e Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 24 Jun 2023 12:56:38 -0700 Subject: first arg is the binary path --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index f24b73b..9c16762 100644 --- a/src/main.rs +++ b/src/main.rs @@ -442,6 +442,7 @@ async fn main() { tracing_subscriber::fmt::init(); let mut args = std::env::args(); + args.next().expect("first arg exists"); let config_path = args.next().unwrap_or("./webserver_config.json".to_string()); let web_config: WebserverConfig = serde_json::from_reader(std::fs::File::open(config_path).expect("file exists and is accessible")).expect("valid json for WebserverConfig"); let mut psks = PSKS.write().expect("can write lock"); -- cgit v1.1