Log an error when git-repository-url is not configured

Fixes #2
main
Jan-Erik Rediger 2022-11-01 18:28:46 +01:00
parent 2448157db0
commit 1be941bce6
1 changed files with 4 additions and 1 deletions

View File

@ -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 {