Skip to content

Commit

Permalink
Made sure the tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-F-Bryan committed Jul 20, 2019
1 parent 10b50cd commit a42d1a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/html_handlebars/hbs_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a42d1a6

Please sign in to comment.