Skip to content

Commit

Permalink
Fix for issue reported by Toby Crawley here:
Browse files Browse the repository at this point in the history
http://talk-archive.awestruct.org/Awestruct-refactor-aka-awestructx-tp5p11.html

Ensure site.output_dir is created before the pipeline executes at all.
  • Loading branch information
bobmcwhirter committed May 3, 2012
1 parent e80a8dd commit 5bc95f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/awestruct/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def load_pipeline
end

def execute_pipeline
FileUtils.mkdir_p( site.config.output_dir )
pipeline.execute( site )
end

Expand All @@ -203,6 +204,7 @@ def load_pages
end

def generate_output
FileUtils.mkdir_p( site.config.output_dir )
@site.pages.each do |page|
generated_path = File.join( site.config.output_dir, page.output_path )
if ( page.stale_output?( generated_path ) )
Expand Down

0 comments on commit 5bc95f1

Please sign in to comment.