diff --git a/runner/engine.go b/runner/engine.go index 7eec8f73..b6457043 100644 --- a/runner/engine.go +++ b/runner/engine.go @@ -63,13 +63,10 @@ func NewEngine(cfgPath string, debugMode bool) (*Engine, error) { canExit: make(chan bool, 1), binStopCh: make(chan bool), exitCh: make(chan bool), + fileChecksums: &checksumMap{m: make(map[string]string)}, watchers: 0, } - if cfg.Build.ExcludeUnchanged { - e.fileChecksums = &checksumMap{m: make(map[string]string)} - } - return &e, nil } diff --git a/runner/engine_test.go b/runner/engine_test.go index 5bbbefe2..b521e6ba 100644 --- a/runner/engine_test.go +++ b/runner/engine_test.go @@ -128,6 +128,7 @@ func TestRebuild(t *testing.T) { t.Fatalf("Should not be fail: %s.", err) } engine, err := NewEngine("", true) + engine.config.Build.ExcludeUnchanged = true if err != nil { t.Fatalf("Should not be fail: %s.", err) }