File tree 1 file changed +11
-8
lines changed
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 {
447
447
}
448
448
449
449
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
+ }
458
461
}
459
462
}
460
463
You can’t perform that action at this time.
0 commit comments