feat(cli): call watcher close at process exit#2550
Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
|
Can we add a test to ensure that if there are any errors, the watcher can be closed with a zero exit code? |
I tested it, because the |
|
I get some info after research, it is difficult to ensure async task is finished at process exit. But here has a helper info us to out. If you ^C a process, the kernel sends a SIGINT to the process group; that usually terminates both the parent and its children, grandchildren, and so on. So we only need to care about is using watch cli bin at child process, Like test watch-cli using child process, it is unstable at process exit. So here i suggest to skip it at now. |
|
tracking test at #2584 |
Description
Inspired rollup implementation, ref https://github.com/rollup/rollup/blob/master/cli/run/watch-cli.ts#L31