Warn instead of failing for themes

This commit is contained in:
Guillaume Gomez 2019-05-23 13:45:30 +02:00
parent 3eba28432f
commit dcccd28e42
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);