process.exitCode
-
<integer> | <string> | <null> | <undefined> 退出码。对于字符串类型,仅允许整数字符串(例如,'1')。默认值:
undefined。¥<integer> | <string> | <null> | <undefined> The exit code. For string type, only integer strings (e.g.,'1') are allowed. Default:
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.