How can I make npm install stop (conditionally) within a preinstall script?
Currently I have a preinstall script preinstall.js:
if (someCondition) {
process.kill(process.ppid, 'SIGKILL');
}
package.json:
{
"scripts": {
"preinstall": "node preinstall"
}
}
However this will result in:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
I would like to exit the process gracefully.
Any ideas?