Skip to content

Commit

Permalink
Warn instead of failing for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 18, 2019
1 parent 3eba284 commit dcccd28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/config.rs
Expand Up @@ -371,10 +371,9 @@ impl Options {
}
let (success, ret) = theme::test_theme_against(&theme_file, &paths, &diag);
if !success || !ret.is_empty() {
diag.struct_err(&format!("invalid theme: \"{}\"", theme_s))
diag.struct_warn(&format!("invalid theme: \"{}\"", theme_s))
.help("check what's wrong with the --theme-checker option")
.emit();
return Err(1);
}
themes.push(theme_file);
}
Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/theme.rs
Expand Up @@ -273,6 +273,7 @@ pub fn test_theme_against<P: AsRef<Path>>(
diag: &Handler,
) -> (bool, Vec<String>) {
let data = try_something!(fs::read(f), diag, (false, vec![]));

let paths = load_css_paths(&data);
let mut ret = vec![];
get_differences(against, &paths, &mut ret);
Expand Down

0 comments on commit dcccd28

Please sign in to comment.