Węzeł JS zrezygnował
process.exit();
garzj
process.exit();
process.exit()
new Promise<void>((resolve, reject) => {
const child = exec('npm run something')
if (child.stdout) {
child.stdout.pipe(process.stdout)
}
if (child.stderr) {
child.stderr.pipe(process.stderr)
}
child.on('exit', (code) => {
if (code !== 0) {
reject()
return
}
resolve()
})
})
Just press CTRL+C
const exitCode = 3;
console.log("This is executed");
process.exit(exitCode); // Ends execution
console.log("This is not executed");
JScopyprocess.exit(1)