Made sure the tests pass
This commit is contained in:
parent
5b0a23ebab
commit
bb412edf53
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue