From 5bc95f1da22a1933156ed96b64ea7cae7b2dea5a Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Thu, 3 May 2012 16:59:26 -0400 Subject: [PATCH] Fix for issue reported by Toby Crawley here: http://talk-archive.awestruct.org/Awestruct-refactor-aka-awestructx-tp5p11.html Ensure site.output_dir is created before the pipeline executes at all. --- lib/awestruct/engine.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/awestruct/engine.rb b/lib/awestruct/engine.rb index 52259a8b..4a6df685 100644 --- a/lib/awestruct/engine.rb +++ b/lib/awestruct/engine.rb @@ -180,6 +180,7 @@ def load_pipeline end def execute_pipeline + FileUtils.mkdir_p( site.config.output_dir ) pipeline.execute( site ) end @@ -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 ) )