]> git.lizzy.rs Git - rust.git/commitdiff
fix json running all the time
authorviandoxdev <titouangoulois29@gmail.com>
Tue, 1 Nov 2022 21:18:19 +0000 (22:18 +0100)
committerviandoxdev <titouangoulois29@gmail.com>
Tue, 1 Nov 2022 21:18:19 +0000 (22:18 +0100)
src/bootstrap/doc.rs

index 649c11be8e05a51735cc33b1a0a775d378a6d813..827a5346491d22864eaf05d030f2bda5bd86fc5a 100644 (file)
@@ -524,8 +524,13 @@ impl Step for JsonStd {
     const DEFAULT: bool = false;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        let default = run.builder.config.docs && run.builder.config.cmd.json();
-        run.all_krates("test").path("library").default_condition(default)
+        if run.builder.config.cmd.json() {
+            let default = run.builder.config.docs && run.builder.config.cmd.json();
+            run.all_krates("test").path("library").default_condition(default)
+        } else {
+            // Without this JsonStd would take priority on Std and prevent it from running.
+            run.never()
+        }
     }
 
     fn make_run(run: RunConfig<'_>) {