Disarm drop bombs for unexecuted test Cargo commands

The code for running tests uses a custom command machinery because it streams the output of the command. We thus need to mark the command as executed in a dry run, to avoid a drop bomb panic.
This commit is contained in:
Jakub Beránek 2024-07-07 16:59:14 +02:00 committed by Jakub Beránek
parent ebb3089038
commit 0cab9626f4
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
2 changed files with 2 additions and 1 deletions

View file

@ -58,7 +58,7 @@ impl GitInfo {
// Ok, let's scrape some info
let ver_date = output(
&mut helpers::git(Some(dir))
helpers::git(Some(dir))
.arg("log")
.arg("-1")
.arg("--date=short")

View file

@ -33,6 +33,7 @@ pub(crate) fn try_run_tests(
stream: bool,
) -> bool {
if builder.config.dry_run() {
cmd.mark_as_executed();
return true;
}