Define a :config mode, dont run external pipeline on config mode. Fixes #1844

This commit is contained in:
Thomas Reynolds 2016-03-20 16:31:15 -07:00
parent 02a0b557f6
commit 7e42954258
3 changed files with 4 additions and 0 deletions

View file

@ -46,6 +46,7 @@ end
::Middleman::Logger.singleton(3) ::Middleman::Logger.singleton(3)
::Middleman::Cli.config = ::Middleman::Application.new do ::Middleman::Cli.config = ::Middleman::Application.new do
config[:mode] = :config
config[:exit_before_ready] = true config[:exit_before_ready] = true
config[:watcher_disable] = true config[:watcher_disable] = true
config[:disable_sitemap] = true config[:disable_sitemap] = true

View file

@ -23,6 +23,7 @@ module Middleman::Cli
::Middleman::Logger.singleton(2, false) ::Middleman::Logger.singleton(2, false)
app = ::Middleman::Application.new do app = ::Middleman::Application.new do
config[:mode] = :config
config[:disable_sitemap] = true config[:disable_sitemap] = true
config[:watcher_disable] = true config[:watcher_disable] = true
config[:exit_before_ready] = true config[:exit_before_ready] = true

View file

@ -10,6 +10,8 @@ class Middleman::Extensions::ExternalPipeline < ::Middleman::Extension
def initialize(app, config={}, &block) def initialize(app, config={}, &block)
super super
return if app.mode?(:config)
require 'thread' require 'thread'
@watcher = app.files.watch :source, @watcher = app.files.watch :source,