Skip to content

Commit 55c3b43

Browse files
committed
don't add -- if remainder is empty
1 parent 80da469 commit 55c3b43

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

miri-script/src/main.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,11 @@ impl Command {
130130
| Self::Fmt { flags }
131131
| Self::Clippy { flags }
132132
| Self::Run { flags, .. }
133-
| Self::Test { flags, .. } => {
134-
flags.push("--".into());
135-
flags.extend(remainder);
136-
}
133+
| Self::Test { flags, .. } =>
134+
if !remainder.is_empty() {
135+
flags.push("--".into());
136+
flags.extend(remainder);
137+
},
137138
_ => (),
138139
}
139140
}
@@ -216,6 +217,7 @@ fn main() -> Result<()> {
216217
let args = Cli::parse_from(miri_args);
217218
let mut command = args.command;
218219
command.add_remainder(remainder);
220+
dbg!(&command);
219221
command.exec()?;
220222
Ok(())
221223
}

0 commit comments

Comments
 (0)