From f3a03ab4d196500dd904188ca15dcd201072e4a0 Mon Sep 17 00:00:00 2001 From: primardj Date: Fri, 5 Apr 2024 23:41:24 +0100 Subject: [PATCH] set the command --- 01_phase_rust_src/sv/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/01_phase_rust_src/sv/src/main.rs b/01_phase_rust_src/sv/src/main.rs index 6278c01..eeac18b 100644 --- a/01_phase_rust_src/sv/src/main.rs +++ b/01_phase_rust_src/sv/src/main.rs @@ -39,6 +39,7 @@ fn main() { let mut i = 0; + let mut command; for val in arg_parser.iter() { if i == 0 { @@ -58,7 +59,11 @@ fn main() { exit(100); } } - // TODO: Set the command if it is given + else if i == 1 { + command = val; + dbg!(command); + i += 1; + } // TODO: Exec the command on all given services. else if i == 3 { svwait_var = match val.parse::() {