Return error exit code for "No lines…" error.
Fixes https://github.com/exussum12/coverageChecker/issues/72
This is one way to address the above issue. If "no lines" is considered an error, which makes it impossible to produce a meaningful result, we should return an error code. That way this error is catchable by external users.
This makes a lot of sense thanks! There are 2 failing tests, any chance you could update the tests too ?
I updated the testNoCoveredLines, but I don't know why testWorkingCorrectly was asserting No lines found in the first place :confused:
Sorry for the build spam, I will check out locally and get this merged ASAP. Sorry about delay, I have been travelling
looking at this, it causes some issues when adding here. I think I have another fix, which is more of an oversight. If the parsing of the json fails (due to not being JSON for example) an exception is thrown, but not with a status code. The default status is 0 and the code then exits with 0, which the shell interprets as success.
I will test some more scenarios with this and get a PR up