c8 icon indicating copy to clipboard operation
c8 copied to clipboard

Cannot add flags after the script

Open darcyrush opened this issue 7 months ago • 3 comments

  • Version: v22.4.0
  • Platform: Linux M720q 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I am executing c8 like so;

c8 --src=src/ npm run test

Where npm run test is a custom defined npm command with its own parameters.

Sometimes I need to generate a report, so I do

c8 --src=src/ --reports-dir=coverage/ --reporter=text --reporter=lcov npm run test

All good.

Looking at help, it appears that c8 allows additional parameters after the script

$ npx c8 --help
c8 [opts] [script] [opts]

I tried to execute flags like so, but the flags after the npm run test script are ignored

c8 --src=src/ npm run test --reports-dir=coverage/ --reporter=text --reporter=lcov

How can I add the flags after the npm run test script?

darcyrush avatar Jul 16 '24 09:07 darcyrush