From dcccd28e42616ae97f3e0ec97be326f634a9e12c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 23 May 2019 13:45:30 +0200 Subject: [PATCH] Warn instead of failing for themes --- src/librustdoc/config.rs | 3 +-- src/librustdoc/theme.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 2b8e060ce8e..853be97530b 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -371,10 +371,9 @@ pub fn from_matches(matches: &getopts::Matches) -> Result { } 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); } diff --git a/src/librustdoc/theme.rs b/src/librustdoc/theme.rs index 7037a146c50..1be85f4a91d 100644 --- a/src/librustdoc/theme.rs +++ b/src/librustdoc/theme.rs @@ -273,6 +273,7 @@ pub fn test_theme_against>( diag: &Handler, ) -> (bool, Vec) { 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); -- 2.44.0