Skip to content

Commit ffd4078

Browse files
committed
fix json running all the time
1 parent 6e1361f commit ffd4078

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/bootstrap/doc.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,13 @@ impl Step for JsonStd {
524524
const DEFAULT: bool = false;
525525

526526
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
527-
let default = run.builder.config.docs && run.builder.config.cmd.json();
528-
run.all_krates("test").path("library").default_condition(default)
527+
if run.builder.config.cmd.json() {
528+
let default = run.builder.config.docs && run.builder.config.cmd.json();
529+
run.all_krates("test").path("library").default_condition(default)
530+
} else {
531+
// Without this JsonStd would take priority on Std and prevent it from running.
532+
run.never()
533+
}
529534
}
530535

531536
fn make_run(run: RunConfig<'_>) {

0 commit comments

Comments
 (0)