From f0a60edf299405ec1e889bf4c99aa70c41fdc556 Mon Sep 17 00:00:00 2001 From: Tom Vaughan Date: Tue, 16 Jul 2013 21:24:45 -0400 Subject: [PATCH] work-around a problem with running build in an extension --- lib/middleman-deploy/commands.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/middleman-deploy/commands.rb b/lib/middleman-deploy/commands.rb index 0cd9afa..a099a32 100644 --- a/lib/middleman-deploy/commands.rb +++ b/lib/middleman-deploy/commands.rb @@ -37,7 +37,11 @@ module Middleman else build_before = self.deploy_options.build_before end - Middleman::Cli::Build.new.build if build_before + if build_before + # http://forum.middlemanapp.com/t/problem-with-the-build-task-in-an-extension + builder = ::Middleman::Cli::Build.new(args=[], options={:instrument=>false}) + builder.build + end send("deploy_#{self.deploy_options.method}") end