diff --git a/pkg/watch/paths.go b/pkg/watch/paths.go index d0651d848..b2817cdc1 100644 --- a/pkg/watch/paths.go +++ b/pkg/watch/paths.go @@ -10,17 +10,6 @@ import ( "github.com/tilt-dev/tilt/internal/ospath" ) -func greatestExistingAncestors(paths []string) ([]string, error) { - result := []string{} - for _, p := range paths { - newP, err := greatestExistingAncestor(p) - if err != nil { - return nil, fmt.Errorf("Finding ancestor of %s: %v", p, err) - } - result = append(result, newP) - } - return result, nil -} func greatestExistingAncestor(path string) (string, error) { if path == string(filepath.Separator) || path == fmt.Sprintf("%s%s", filepath.VolumeName(path), string(filepath.Separator)) { diff --git a/pkg/watch/watcher_naive.go b/pkg/watch/watcher_naive.go index d42d3a609..f66d5ad52 100644 --- a/pkg/watch/watcher_naive.go +++ b/pkg/watch/watcher_naive.go @@ -303,3 +303,15 @@ func newWatcher(paths []string, ignore PathMatcher, l logger.Logger) (*naiveNoti } var _ Notify = &naiveNotify{} + +func greatestExistingAncestors(paths []string) ([]string, error) { + result := []string{} + for _, p := range paths { + newP, err := greatestExistingAncestor(p) + if err != nil { + return nil, fmt.Errorf("Finding ancestor of %s: %v", p, err) + } + result = append(result, newP) + } + return result, nil +}