diff --git a/src/setup/node.rs b/src/setup/node.rs index 43ad5ad1..ad9be6e8 100644 --- a/src/setup/node.rs +++ b/src/setup/node.rs @@ -76,17 +76,12 @@ impl Node { // insert the config file cmd args match node.meta.kind { NodeKind::Zebra => { - // Bit more convoluted since we need to insert the args before `start`, which comes last. - let start_arg = node - .meta - .start_args - .pop() - .expect("Expected at least one arg for Zebra (`start`)"); - node.meta.start_args.push("--config".into()); - node.meta - .start_args - .push(node.config_filepath().into_os_string()); - node.meta.start_args.push(start_arg); + let arg_len = node.meta.start_args.len(); + assert!(arg_len > 1, "Expected at least one arg for Zebra (`start`)"); + node.meta.start_args.insert( + arg_len - 2, + format!("--config {}", node.config_filepath().to_str().unwrap()).into(), + ); } NodeKind::Zcashd => { node.meta