File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments