Made sure the tests pass

This commit is contained in:
Michael Bryan 2019-07-21 04:32:28 +08:00
parent 5b0a23ebab
commit bb412edf53
No known key found for this signature in database
GPG Key ID: E9C602B0D9A998DC
2 changed files with 4 additions and 5 deletions

View File

@ -190,9 +190,6 @@ impl MDBook {
renderer.name().to_string(),
);
let name = renderer.name();
let build_dir = self.build_dir_for(name);
for preprocessor in &self.preprocessors {
if preprocessor_should_run(&**preprocessor, renderer, &self.config) {
debug!("Running the {} preprocessor.", preprocessor.name());

View File

@ -282,8 +282,10 @@ impl Renderer for HtmlHandlebars {
let destination = &ctx.destination;
let book = &ctx.book;
utils::remove_dir_contents(destination)
.chain_err(|| "Unable to remove stale HTML output")?
if destination.exists() {
utils::fs::remove_dir_content(destination)
.chain_err(|| "Unable to remove stale HTML output")?;
}
trace!("render");
let mut handlebars = Handlebars::new();