Skip to content

Commit

Permalink
don't add -- if remainder is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Mandragorian committed Nov 17, 2024
1 parent 80da469 commit 283e0f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions miri-script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ impl Command {
| Self::Clippy { flags }
| Self::Run { flags, .. }
| Self::Test { flags, .. } => {
flags.push("--".into());
flags.extend(remainder);
if !remainder.is_empty() {
flags.push("--".into());
flags.extend(remainder);
}
}
_ => (),
}
Expand Down Expand Up @@ -216,6 +218,7 @@ fn main() -> Result<()> {
let args = Cli::parse_from(miri_args);
let mut command = args.command;
command.add_remainder(remainder);
dbg!(&command);
command.exec()?;
Ok(())
}

0 comments on commit 283e0f1

Please sign in to comment.