-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
pnpm 跑 father dev ⌃+C 退出时报错 #573
Labels
bug
Something isn't working
Comments
我这里也是 pnpm ,退出正常。 |
看了下应该是 pnpm 在执行命令的时候,对没有 exitCode 的进程退出也会当做错误退出导致的,用如下方式即可复现:
setTimeout(() => {}, 10000);
"scripts": {
"a": "node a.js"
}
要处理的话也比较容易,在 a.js 里监听进程退出,手动指定退出码即可: process.on('SIGINT', () => process.exit(0)); 但比较奇怪 pnpm 这个行为,难道所有 script 都需要手动处理 |
不太了解,也搜不到相关的 issue 和信息,好像社区并不 care 这个事情,手动终止就是没运行完脚本,是错误的结果。 |
最终方案:给 dev 命令处理 SIGINT,因为 dev 必须要 Ctrl+C 结束;其他命令仍保持原样,不强行改变 exitCode |
v4.1.4 已修复 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
是不是给的 signal 不对?其他包管理工具不清楚。
The text was updated successfully, but these errors were encountered: