Skip to content

Commit 0cab962

Browse files
committed
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.
1 parent ebb3089 commit 0cab962

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/bootstrap/src/utils/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl GitInfo {
5858

5959
// Ok, let's scrape some info
6060
let ver_date = output(
61-
&mut helpers::git(Some(dir))
61+
helpers::git(Some(dir))
6262
.arg("log")
6363
.arg("-1")
6464
.arg("--date=short")

src/bootstrap/src/utils/render_tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub(crate) fn try_run_tests(
3333
stream: bool,
3434
) -> bool {
3535
if builder.config.dry_run() {
36+
cmd.mark_as_executed();
3637
return true;
3738
}
3839

0 commit comments

Comments
 (0)