stoeffel / elm-verify-examples

BSD 3-Clause "New" or "Revised" License
167 stars 14 forks source link

Confusing behavior of --elm-test option #82

Open tad-lispy opened 5 years ago

tad-lispy commented 5 years ago

Hey! Thanks for this program. It's very useful and I appreciate your effort in creating and maintaining it.

The problem

If I pass a wrong value to --elm-test option the program silently falls back to default elm-test. I believe it's a wrong design choice. I would expect a meaningful error, like:

$ elm-verify-examples --elm-test typoz-here
Error: no such file or directory: typoz-here

The problem is caused here: https://github.com/stoeffel/elm-verify-examples/blob/master/bin/runner.js#L93-L96

Would you be interested in a PR addressing this?

Use case:

I run into this while trying to use your program with elm-coverage. I tried:

elm-verify-examples --elm-test elm-coverage

and it just ran elm-test. I tried:

elm-verify-examples --elm-test 'npx elm-coverage'

Same thing. At this point I looked into source code and found what's going on.

gampleman commented 1 year ago

👍 PRs welcome