Skip to content

Commit c6c69a5

Browse files
andreyneringsunpe
andcommitted
fix: address compilation error on watch_test.go
Closes #1567 Co-authored-by: sunpe <sunpeng.dev@gmail.com>
1 parent 1f157fe commit c6c69a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

watch.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (e *Executor) registerWatchedFiles(w *watcher.Watcher, calls ...*ast.Call)
157157
if err != nil {
158158
return err
159159
}
160-
if shouldIgnoreFile(absFile) {
160+
if ShouldIgnoreFile(absFile) {
161161
continue
162162
}
163163
if _, ok := watchedFiles[absFile]; ok {
@@ -180,7 +180,7 @@ func (e *Executor) registerWatchedFiles(w *watcher.Watcher, calls ...*ast.Call)
180180
return nil
181181
}
182182

183-
func shouldIgnoreFile(path string) bool {
183+
func ShouldIgnoreFile(path string) bool {
184184
ignorePaths := []string{
185185
"/.task",
186186
"/.git",

watch_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Hello, World!
5858
case <-ctx.Done():
5959
return
6060
default:
61-
err := e.Run(ctx, ast.Task: "default"})
61+
err := e.Run(ctx, &ast.Call{Task: "default"})
6262
if err != nil {
6363
return
6464
}
@@ -94,7 +94,7 @@ func TestShouldIgnoreFile(t *testing.T) {
9494
ct := ct
9595
t.Run(fmt.Sprintf("ignore - %d", k), func(t *testing.T) {
9696
t.Parallel()
97-
require.Equal(t, shouldIgnoreFile(ct.path), ct.expect)
97+
require.Equal(t, task.ShouldIgnoreFile(ct.path), ct.expect)
9898
})
9999
}
100100
}

0 commit comments

Comments
 (0)