diff --git a/internal/filewatcher/term_unix.go b/internal/filewatcher/term_unix.go index a277b9a4..303d6bcc 100644 --- a/internal/filewatcher/term_unix.go +++ b/internal/filewatcher/term_unix.go @@ -80,6 +80,9 @@ func (r *redoHandler) Run(ctx context.Context) { case 'd': chResume = make(chan struct{}) r.ch <- RunOptions{Debug: true, resume: chResume} + case 'a': + chResume = make(chan struct{}) + r.ch <- RunOptions{resume: chResume, PkgPath: "./..."} case '\n': fmt.Println() continue diff --git a/internal/filewatcher/watch.go b/internal/filewatcher/watch.go index a24bcf5b..447c6894 100644 --- a/internal/filewatcher/watch.go +++ b/internal/filewatcher/watch.go @@ -56,7 +56,9 @@ func Watch(dirs []string, run func(opts RunOptions) error) error { resetTimer(timer) redo.ResetTerm() - opts.PkgPath = h.lastPath + if opts.PkgPath == "" { + opts.PkgPath = h.lastPath + } if err := h.runTests(opts); err != nil { return fmt.Errorf("failed to rerun tests for %v: %v", opts.PkgPath, err) }