From fcfbedd077de5093198d0c73fbda8dc7566c7c68 Mon Sep 17 00:00:00 2001 From: Zaratusa Date: Fri, 3 Feb 2023 23:53:08 +0100 Subject: [PATCH] fix: steamcmd gets stuck after retrieving user info --- src/main.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5ba8d40..316068a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,12 +53,13 @@ fn main() { } }; - let cmd_arg = format!("+login {} {} {} {}", &args.username, &args.password, &totp, &args.args); + let status = std::process::Command::new(&args.path) + .arg("+login") + .arg(&args.username) + .arg(&args.password) + .arg(&totp) + .args(args.args.split(' ')) + .status(); - let mut cmd = std::process::Command::new(&args.path); - cmd.arg(&cmd_arg); - - println!("{} {:?}\n", &args.path, &cmd_arg.replace(&args.username, "****").replace(&args.password, "****").replace(&totp, "****")); - - std::process::exit(cmd.status().unwrap().code().unwrap()); + std::process::exit(status.unwrap().code().unwrap()); } \ No newline at end of file