Define a :config mode, dont run external pipeline on config mode. Fixes #1844
This commit is contained in:
parent
02a0b557f6
commit
7e42954258
|
@ -46,6 +46,7 @@ end
|
|||
|
||||
::Middleman::Logger.singleton(3)
|
||||
::Middleman::Cli.config = ::Middleman::Application.new do
|
||||
config[:mode] = :config
|
||||
config[:exit_before_ready] = true
|
||||
config[:watcher_disable] = true
|
||||
config[:disable_sitemap] = true
|
||||
|
|
|
@ -23,6 +23,7 @@ module Middleman::Cli
|
|||
::Middleman::Logger.singleton(2, false)
|
||||
|
||||
app = ::Middleman::Application.new do
|
||||
config[:mode] = :config
|
||||
config[:disable_sitemap] = true
|
||||
config[:watcher_disable] = true
|
||||
config[:exit_before_ready] = true
|
||||
|
|
|
@ -10,6 +10,8 @@ class Middleman::Extensions::ExternalPipeline < ::Middleman::Extension
|
|||
def initialize(app, config={}, &block)
|
||||
super
|
||||
|
||||
return if app.mode?(:config)
|
||||
|
||||
require 'thread'
|
||||
|
||||
@watcher = app.files.watch :source,
|
||||
|
|
Loading…
Reference in a new issue