How do I make Jenkins build fail when Newman tests fail

I am stuck with this issue -
eg- I have 2 collections one passes and one fails , both are fired by two separate newman commands.

newman run col1.json this contains failure test case
newman run col2.json this passes

when integrated with jenkins as last executed is col2 and it successfull the build result is success, but it should be failure, do have any idea

This also has been raised at https://github.com/postmanlabs/newman/issues/853. I donot know how can I resolve this issue. Could someone please advise.

It looks like you have a solution for this already based on the GitHub issue you raised.

However I will mention a solution that I have used and seems to work for me.
I simply use a bash script and put my Newman runs in there.

I add set -e at the first of my script. This will tell it to exit on error if there is an issue, this in my case results in a failure on the Jenkins job.

Hopefully this helps you and others that have an issue.