Skip to content

Commit

Permalink
fix(pwt): skip .last-run.json file 4
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Sep 11, 2024
1 parent ae6e754 commit 569bf90
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions internal/worker/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"log"
"os"
"path/filepath"
"sync"

"github.com/bmatcuk/doublestar"
"github.com/fsnotify/fsnotify"
)

Expand Down Expand Up @@ -73,8 +73,7 @@ func (fw *filesCollector) watch() {

func (fw *filesCollector) consumeCreateEvent(event fsnotify.Event) error {
for _, ignorePattern := range fw.ignorePatterns {
matched, err := filepath.Match(ignorePattern, event.Name)
fmt.Println(matched, err, ignorePattern, event.Name)
matched, err := doublestar.Match(ignorePattern, event.Name)
if err != nil {
return fmt.Errorf("could not match pattern: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion worker-java/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,5 @@ func main() {
Handler: handler,
ExecutionDirectory: projectDir,
TransformOutput: transformOutput,
IgnoreFilePatterns: []string{filepath.Join(projectDir, "target", "**")},
}).Run()
}
2 changes: 1 addition & 1 deletion worker-javascript/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ func handler(w *worker.Worker, code string) error {
func main() {
worker.NewWorker(&worker.WorkerExectionOptions{
Handler: handler,
IgnoreFilePatterns: []string{"*.last-run.json"},
IgnoreFilePatterns: []string{"**/*.last-run.json"},
}).Run()
}

0 comments on commit 569bf90

Please sign in to comment.