Skip to content

Commit 026c749

Browse files
Only run rustdoc-js test suite when nodejs is available
1 parent 6952199 commit 026c749

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/bootstrap/check.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,17 @@ impl Step for RustdocJS {
447447
}
448448

449449
fn run(self, builder: &Builder) {
450-
let nodejs = builder.config.nodejs.clone();
451-
let mut command = Command::new(&nodejs.expect("no nodejs found"));
452-
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
453-
builder.ensure(::doc::Std {
454-
target: self.target,
455-
stage: builder.top_stage,
456-
});
457-
builder.run(&mut command);
450+
if let Some(ref nodejs) = builder.config.nodejs {
451+
let mut command = Command::new(nodejs);
452+
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
453+
builder.ensure(::doc::Std {
454+
target: self.target,
455+
stage: builder.top_stage,
456+
});
457+
builder.run(&mut command);
458+
} else {
459+
println!("No nodejs found, skipping \"src/test/rustdoc-js\" tests");
460+
}
458461
}
459462
}
460463

0 commit comments

Comments
 (0)