Skip to content

Commit 569bf90

Browse files
committed
fix(pwt): skip .last-run.json file 4
1 parent ae6e754 commit 569bf90

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

internal/worker/files.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"log"
66
"os"
7-
"path/filepath"
87
"sync"
98

9+
"github.com/bmatcuk/doublestar"
1010
"github.com/fsnotify/fsnotify"
1111
)
1212

@@ -73,8 +73,7 @@ func (fw *filesCollector) watch() {
7373

7474
func (fw *filesCollector) consumeCreateEvent(event fsnotify.Event) error {
7575
for _, ignorePattern := range fw.ignorePatterns {
76-
matched, err := filepath.Match(ignorePattern, event.Name)
77-
fmt.Println(matched, err, ignorePattern, event.Name)
76+
matched, err := doublestar.Match(ignorePattern, event.Name)
7877
if err != nil {
7978
return fmt.Errorf("could not match pattern: %w", err)
8079
}

worker-java/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,5 @@ func main() {
7474
Handler: handler,
7575
ExecutionDirectory: projectDir,
7676
TransformOutput: transformOutput,
77-
IgnoreFilePatterns: []string{filepath.Join(projectDir, "target", "**")},
7877
}).Run()
7978
}

worker-javascript/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ func handler(w *worker.Worker, code string) error {
2929
func main() {
3030
worker.NewWorker(&worker.WorkerExectionOptions{
3131
Handler: handler,
32-
IgnoreFilePatterns: []string{"*.last-run.json"},
32+
IgnoreFilePatterns: []string{"**/*.last-run.json"},
3333
}).Run()
3434
}

0 commit comments

Comments
 (0)