about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-05-23 13:45:30 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-18 16:43:47 +0100
commitdcccd28e42616ae97f3e0ec97be326f634a9e12c (patch)
tree5ad51fa418f5729226b1fa65b46460994672e882
parent3eba28432fc83935940e0c44182eec4c97e12b69 (diff)
downloadrust-dcccd28e42616ae97f3e0ec97be326f634a9e12c.tar.gz
rust-dcccd28e42616ae97f3e0ec97be326f634a9e12c.zip
Warn instead of failing for themes
-rw-r--r--src/librustdoc/config.rs3
-rw-r--r--src/librustdoc/theme.rs1
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 @@ 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);
             }
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<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);