oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.26k stars 2.69k forks source link

`bun --filter` leaves the process open when pressing `Ctrl + C` #10649

Open viniciusbitt opened 4 months ago

viniciusbitt commented 4 months ago

What version of Bun is running?

1.1.6+e58d67b46

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

I'm using Drizzle and when I run the following command:

bun --filter='@workspace/db' db-studio

and press Ctrl + C, the process Node.js JavaScript Runtime doesn't finish

What is the expected behavior?

End the process

What do you see instead?

image image

Additional information

No response

pg-wtatum commented 2 months ago

This reproduces fairly trivially with any long-running child process, doesn't seem to matter if the sub project is a bun process or something else. Maybe this feature was only originally meant for running things like code gens, not for running a dev server? That seems at odds with the example at https://bun.sh/docs/cli/filter which shows it used to run next dev among other things.

Minor annoyance if all your packages support a watch mode but I have a few I have to regularly restart and having to kill all the leftover processes is a no go.

pg-wtatum commented 1 month ago

Any advice on workarounds like alternative ways to halt the process tree?