Closed gfranco closed 6 years ago
Not sure is it a bug, but coa doesn't keep an exit code if process.exit was called somewhere outside.
process.exit
process.once('uncaughtException', () => { process.exit(1); }); setTimeout(() => { throw Error('0_o'); }, 500); require('coa').Cmd() .name('Ololo').title('Ololo') .act(() => { setTimeout(() => console.log('OK'), 1000); }) .run(process.argv.slice(2));
Expected Result: Exit code 1
Actual Result: Exit code 0
Coverage remained the same at 69.714% when pulling 54ff3f6d0f2010592cbc3cf68ff1e0c89fd56ee6 on gfranco:patch-1 into 05bd8dd95703ce2284169928b52dfe28204b72e7 on veged:master.
Thank you very much, I'll try to publish this asap.
Published in 2.0.1
Not sure is it a bug, but coa doesn't keep an exit code if
process.exit
was called somewhere outside.Expected Result: Exit code 1
Actual Result: Exit code 0