sdk: Fix args after "--" in build-bpf and test-bpf (#27221)

This commit is contained in:
Jon Cinque 2022-08-18 04:52:54 +02:00 committed by GitHub
parent 0d6a223e63
commit 68a5e05f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -26,8 +26,9 @@ fn main() {
args.remove(0);
}
}
args.push("--arch".to_string());
args.push("bpf".to_string());
let index = args.iter().position(|x| x == "--").unwrap_or(args.len());
args.insert(index, "bpf".to_string());
args.insert(index, "--arch".to_string());
print!("cargo-build-bpf child: {}", program.display());
for a in &args {
print!(" {}", a);

View File

@ -32,8 +32,9 @@ fn main() {
args.remove(0);
}
}
args.push("--arch".to_string());
args.push("bpf".to_string());
let index = args.iter().position(|x| x == "--").unwrap_or(args.len());
args.insert(index, "bpf".to_string());
args.insert(index, "--arch".to_string());
print!("cargo-test-bpf child: {}", program.display());
for a in &args {
print!(" {}", a);