]> git.lizzy.rs Git - rust.git/blobdiff - src/config/config_type.rs
deps: update rustc-ap to v642.0.0
[rust.git] / src / config / config_type.rs
index 7f7e8905fba92a7025573bce0ee41887a9e2ebed..2eff7561392c309fd9a0231cb70b4e8d700f4a20 100644 (file)
@@ -293,10 +293,12 @@ fn set_heuristics(&mut self) {
             fn set_license_template(&mut self) {
                 if self.was_set().license_template_path() {
                     let lt_path = self.license_template_path();
-                    match license::load_and_compile_template(&lt_path) {
-                        Ok(re) => self.license_template = Some(re),
-                        Err(msg) => eprintln!("Warning for license template file {:?}: {}",
-                                              lt_path, msg),
+                    if lt_path.len() > 0 {
+                        match license::load_and_compile_template(&lt_path) {
+                            Ok(re) => self.license_template = Some(re),
+                            Err(msg) => eprintln!("Warning for license template file {:?}: {}",
+                                                lt_path, msg),
+                        }
                     }
                 }
             }