File tree Expand file tree Collapse file tree 2 files changed +178
-207
lines changed Expand file tree Collapse file tree 2 files changed +178
-207
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,13 @@ impl Options {
412
412
413
413
let to_check = matches. opt_strs ( "check-theme" ) ;
414
414
if !to_check. is_empty ( ) {
415
- let paths = theme:: load_css_paths ( static_files:: themes:: LIGHT . as_bytes ( ) ) ;
415
+ let paths = match theme:: load_css_paths ( static_files:: themes:: LIGHT ) {
416
+ Ok ( p) => p,
417
+ Err ( e) => {
418
+ diag. struct_err ( & e. to_string ( ) ) . emit ( ) ;
419
+ return Err ( 1 ) ;
420
+ }
421
+ } ;
416
422
let mut errors = 0 ;
417
423
418
424
println ! ( "rustdoc: [check-theme] Starting tests! (Ignoring all other arguments)" ) ;
@@ -547,7 +553,13 @@ impl Options {
547
553
548
554
let mut themes = Vec :: new ( ) ;
549
555
if matches. opt_present ( "theme" ) {
550
- let paths = theme:: load_css_paths ( static_files:: themes:: LIGHT . as_bytes ( ) ) ;
556
+ let paths = match theme:: load_css_paths ( static_files:: themes:: LIGHT ) {
557
+ Ok ( p) => p,
558
+ Err ( e) => {
559
+ diag. struct_err ( & e. to_string ( ) ) . emit ( ) ;
560
+ return Err ( 1 ) ;
561
+ }
562
+ } ;
551
563
552
564
for ( theme_file, theme_s) in
553
565
matches. opt_strs ( "theme" ) . iter ( ) . map ( |s| ( PathBuf :: from ( & s) , s. to_owned ( ) ) )
You can’t perform that action at this time.
0 commit comments