File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -483,9 +483,16 @@ func (r *Runner) deleteServiceState(svc string) {
483
483
}
484
484
485
485
func (s * Runner ) monitorWorkDir (ctx context.Context ) <- chan string {
486
- if isValidGitDir (s .WorkDir ) {
487
- log .Println ("observing git directory for changes" )
488
- return s .monitorGitDir (ctx , s .WorkDir )
486
+ if slices .Contains (s .Observables , ".git" ) {
487
+ s .Observables = slices .DeleteFunc (s .Observables , func (observable string ) bool {
488
+ return observable == ".git"
489
+ })
490
+ if isValidGitDir (s .WorkDir ) {
491
+ log .Println ("observing git directory for changes" )
492
+ return s .monitorGitDir (ctx , s .WorkDir )
493
+ } else {
494
+ log .Println ("cannot detect git directory, falling back to file system watcher" )
495
+ }
489
496
}
490
497
return s .monitorWorkDirScanner (ctx )
491
498
}
You can’t perform that action at this time.
0 commit comments