fix(users/Profpatsch/execline/exec_helpers): fix arg loop off-by-1
Change-Id: If20a91eaa6693ba35ce645b104c625dbd0c71726 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2500 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
parent
7bd43d15d9
commit
4d9e5d8e47
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ pub fn args_for_exec(current_prog_name: &str, no_of_positional_args: usize) -> (
|
|||
let mut args = args.map(|arg| arg.into_vec());
|
||||
let mut pos_args = vec![];
|
||||
// get positional args
|
||||
for i in 1..no_of_positional_args {
|
||||
for i in 1..no_of_positional_args+1 {
|
||||
pos_args.push(
|
||||
args.nth(0).expect(
|
||||
&format!("{}: expects {} positional args, only got {}", current_prog_name, no_of_positional_args, i))
|
||||
|
|
Loading…
Reference in a new issue