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 55c3b43
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions miri-script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ impl Command {
| Self::Fmt { flags }
| Self::Clippy { flags }
| Self::Run { flags, .. }
| Self::Test { flags, .. } => {
flags.push("--".into());
flags.extend(remainder);
}
| Self::Test { flags, .. } =>
if !remainder.is_empty() {
flags.push("--".into());
flags.extend(remainder);
},
_ => (),
}
}
Expand Down Expand Up @@ -216,6 +217,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 55c3b43

Please sign in to comment.