From 1be941bce65d14f3e27927ee33d866fa131b7900 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 1 Nov 2022 18:28:46 +0100 Subject: [PATCH] Log an error when git-repository-url is not configured Fixes #2 --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a370443..dffb27b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,10 @@ impl Preprocessor for LastChanged { log::debug!("Git root: {}", git_root.display()); let repository_url = match ctx.config.get("output.html.git-repository-url") { - None => return Ok(book), + None => { + log::error!("mdbook-last-changed was called, but no `output.html.git-repository-url` configured. Book is left unchanged."); + return Ok(book); + } Some(url) => url, }; let repository_url = match repository_url {