-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(core): ensure that run-commands processes are cleaned up #31258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
View your CI Pipeline Execution ↗ for commit b708623.
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes an issue where Nx processes were not being cleaned up after their child tasks exited with SIGINT. The changes introduce a global cleanup handler in running-tasks.ts to ensure that all registered cleanup functions are executed when the process exits and remove the now-unneeded tuiEnabled flag from SeriallyRunningTasks in run-commands.impl.ts.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/nx/src/executors/run-commands/running-tasks.ts | Adds a global cleanupFns array and registers cleanup functions to kill processes on exit |
| packages/nx/src/executors/run-commands/run-commands.impl.ts | Removes the tuiEnabled flag and redundant isTuiEnabled import |
| RunCommandsCommandOptions, | ||
| } from './run-commands.impl'; | ||
|
|
||
| const cleanupFns = []; |
Copilot
AI
May 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding an explicit type annotation for cleanupFns (e.g. Array<() => void>) to improve code clarity and maintainability.
| const cleanupFns = []; | |
| const cleanupFns: Array<() => void> = []; |
1cea6c2 to
b708623
Compare
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Nx processes do not exit when their child tasks are exit with SIGINT
Expected Behavior
Nx processes do exit when their child tasks are exit with SIGINT
Related Issue(s)
Fixes #