Replace global return with process.exit(1)#33
Replace global return with process.exit(1)#33asdofindia wants to merge 2 commits intobalderdashy:masterfrom
Conversation
ESlint fails with "parsing error return outside function" because of this return. Alternative is to use process.exit.
|
@asdofindia thanks! I can dig it-- although what I'm not sure about offhand is if there is ever a scenario where process.exit(1) will not necessarily halt execution within the current file-- i.e. I don't know for certain whether or not we'd still potentially want the I'm pretty sure that used to be something you had to worry about back in the node <4 days-- I just haven't gotten into the weeds with it for a while. Any ideas? |
|
Or... actually, much easier: We could also just throw instead of logging err.stack above. That'd kill two birds with one stone, i think (though it would take some fiddling with the error we throw to make the output look nice) |
ESlint fails with "parsing error return outside function" because of this return. Alternative is to use process.exit.