MCPcopy Index your code
hub / github.com/devspace-sh/devspace / initIgnoreParsers

Method initIgnoreParsers

pkg/devspace/sync/sync.go:178–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176}
177
178func (s *Sync) initIgnoreParsers() error {
179 if s.Options.ExcludePaths != nil {
180 ignoreMatcher, err := ignoreparser.CompilePaths(s.Options.ExcludePaths, s.log)
181 if err != nil {
182 return errors.Wrap(err, "compile exclude paths")
183 }
184
185 s.ignoreMatcher = ignoreMatcher
186 }
187
188 if s.Options.DownloadExcludePaths != nil {
189 ignoreMatcher, err := ignoreparser.CompilePaths(s.Options.DownloadExcludePaths, s.log)
190 if err != nil {
191 return errors.Wrap(err, "compile download exclude paths")
192 }
193
194 s.downloadIgnoreMatcher = ignoreMatcher
195 }
196
197 if s.Options.UploadExcludePaths != nil {
198 ignoreMatcher, err := ignoreparser.CompilePaths(s.Options.UploadExcludePaths, s.log)
199 if err != nil {
200 return errors.Wrap(err, "compile upload exclude paths")
201 }
202
203 s.uploadIgnoreMatcher = ignoreMatcher
204 }
205
206 return nil
207}
208
209func (s *Sync) mainLoop(onInitUploadDone chan struct{}, onInitDownloadDone chan struct{}) {
210 s.log.Info("Start syncing")

Callers 1

NewSyncFunction · 0.95

Calls 1

CompilePathsFunction · 0.92

Tested by

no test coverage detected