chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25d3276
)
nwtemplates: Log a warning if there are no templates
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 13:52:42 +0000
(14:52 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 15:02:05 +0000
(16:02 +0100)
This is probably an installation or usage error. Reporting that helps
if subsequently a template isn't found.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/nwtemplates.rs
patch
|
blob
|
history
diff --git
a/src/nwtemplates.rs
b/src/nwtemplates.rs
index b49062e48c824abf6fa49f753fb1e3a040b5b24f..a492bddfed409c41525763d7959651a481274eec 100644
(file)
--- a/
src/nwtemplates.rs
+++ b/
src/nwtemplates.rs
@@
-25,6
+25,11
@@
pub fn init() {
.context("load tamplates")
.with_context(|| nwtemplate_dir.to_string())?;
+ if tera.get_template_names().next().is_none() {
+ warn!("nwtemplates directory {:?} contains no templates!",
+ nwtemplate_dir);
+ }
+
*guard = Some(State {
tera,
})