cenfun / monocart-reporter

A playwright test reporter (Node.js)
https://cenfun.github.io/monocart-reporter/
MIT License
212 stars 12 forks source link

[Bug] Exit status code not set to an error status when the merge CLI fails to find the provided files #155

Closed edumserrano closed 1 month ago

edumserrano commented 1 month ago

Describe the bug The merge CLI returns a zero (OK) status code when it fails due to not being able to find the provided files to merge.

To Reproduce

1) Run the merge CLI and provide a glob that doesn't return any files. For instance: npx monocart merge './i-dont-exist/*.zip'. 2) Note that you get a zero (OK) exit status code even though you get an error message from MR: [MR] ERROR: no files found with glob: ./i-dont-exist/*.zip.

Expected behavior A non-zero (not OK) exit status code should be returned by the merge CLI.

Additional context

The reason I'm asking for this is because at one point I made a mistake on my glob but my CI pipeline still completed successfully but it should have failed because no files were found to merge. To make the pipeline fail, the merge CLI should return a non-zero exit status code if it fails to merge.

cenfun commented 1 month ago

please try monocart-reporter@2.9.6

edumserrano commented 1 month ago

I've tested version 2.9.6 and I can confirm this is fixed. Thank you!