process.exitCode
- <integer> | <string> | <null> | <undefined> 退出代码。对于字符串类型,只允许整数字符串(例如 '1')。默认值:
undefined。
一个数字,当进程正常退出或通过 process.exit() 终止但未指定代码时,该数字将作为进程的退出码。
🌐 A number which will be the process exit code, when the process either
exits gracefully, or is exited via process.exit() without specifying
a code.
将代码指定为 process.exit(code) 将覆盖先前对 process.exitCode 的任何设置。
🌐 Specifying a code to process.exit(code) will override any
previous setting of process.exitCode.