ghciwatch icon indicating copy to clipboard operation
ghciwatch copied to clipboard

Running tests with color disables reload after file change

Open rampion opened this issue 1 year ago • 1 comments

When I run tests via ghciwatch with this command, it will reload and rerun tests whenever I edit a file in the test/ directory

ghciwatch \
  --command 'cabal repl test' \
  --after-startup-ghci 'import System.Environment (withArgs)' \
  --test-ghci 'withArgs ["--match=XXX"] main' \
  --watch test

If I add a --color flag to the test args, the tests run with colors once, but ghciwatch does not appear to reload or rerun tests when a modules in the test/ directory are edited.

ghciwatch \
  --command 'cabal repl test' \
  --after-startup-ghci 'import System.Environment (withArgs)' \
  --test-ghci 'withArgs ["--match=XXX", "--color"] main' \
  --watch test

rampion avatar Dec 22 '23 16:12 rampion