added debug on args

This commit is contained in:
Patrick Mahnke-Hartmann
2025-09-01 16:24:15 +02:00
parent db49bbe751
commit 2dbad98ec2

View File

@@ -27,7 +27,13 @@ async fn flatten<T>(
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> { async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let args: Vec<String> = env::args().collect(); let args: Vec<String> = env::args().collect();
let server_url = &args[0]; // args[0] is the binary name, args[1] is the first actual argument
if args.len() < 2 {
eprintln!("Usage: {} <server-url>", args[0]);
return Err("Missing server URL argument".into());
}
let server_url = &args[1];
// Registration // Registration
let (server_id, ip) = match api::register_with_server(&server_url).await { let (server_id, ip) = match api::register_with_server(&server_url).await {