From ebaca5a712028cd53ffaa08f63ee13220793a824 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Fri, 3 May 2024 00:30:27 +0100 Subject: [PATCH] Don't pass --target twice in tests --- cargo-auditable/tests/it.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cargo-auditable/tests/it.rs b/cargo-auditable/tests/it.rs index 2e8966e..0866d2d 100644 --- a/cargo-auditable/tests/it.rs +++ b/cargo-auditable/tests/it.rs @@ -53,7 +53,9 @@ where .args(args); if let Ok(target) = std::env::var("AUDITABLE_TEST_TARGET") { - command.arg(format!("--target={target}")); + if args.iter().all(|arg| !arg.starts_with("--target")) { + command.arg(format!("--target={target}")); + } } for (name, value) in env {