From b44167f66258712df47c21896961756f8be672df Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Fri, 21 Feb 2020 16:16:52 +0300 Subject: Fix issues during the testing --- service/reload/service.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'service/reload/service.go') diff --git a/service/reload/service.go b/service/reload/service.go index 461f9430..bb85e15d 100644 --- a/service/reload/service.go +++ b/service/reload/service.go @@ -24,10 +24,6 @@ func (s *Service) Init(cfg *Config, c service.Container) (bool, error) { if !s.reloadConfig.Enabled { return false, nil } - wd, err := os.Getwd() - if err != nil { - return false, err - } var configs []WatcherConfig @@ -45,6 +41,10 @@ func (s *Service) Init(cfg *Config, c service.Container) (bool, error) { if cfg.Services[serviceName].service == nil { continue } + ignored, err := ConvertIgnored(config.Ignore) + if err != nil { + return false, err + } configs = append(configs, WatcherConfig{ serviceName: serviceName, recursive: config.Recursive, @@ -59,12 +59,13 @@ func (s *Service) Init(cfg *Config, c service.Container) (bool, error) { return ErrorSkip }, files: make(map[string]os.FileInfo), - ignored: ConvertIgnored(wd, config.Ignore), + ignored: ignored, filePatterns: append(config.Patterns, cfg.Patterns...), }) } - s.watcher, err = NewWatcher(wd, configs) + var err error + s.watcher, err = NewWatcher(configs) if err != nil { return false, err } -- cgit v1.2.3