added debug on args
This commit is contained in:
@@ -27,7 +27,13 @@ async fn flatten<T>(
|
||||
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||
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
|
||||
let (server_id, ip) = match api::register_with_server(&server_url).await {
|
||||
|
Reference in New Issue
Block a user