Reporting build errors from a node js script.

One of my build actions is to run a script written in JS via node to create a nuget package for our project.

If I have an error and call process.exit(-1), TC reports that the step failed, but does not show any of my console.log writes in the log.

If I remove the process.exit call, the console logs are reported, but then TC does not know that the step failed.

Does anyone have any suggestions?

FWIW, I have tried running it via an NPM script and via node.

Please sign in to leave a comment.