-
Notifications
You must be signed in to change notification settings - Fork 75
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
🛑 Stop the process when the CLI task is complete #1576
Conversation
🦋 Changeset detectedLatest commit: 91dbb5b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/myst-cli-utils/src/utils.ts
Outdated
@@ -19,6 +19,9 @@ export function clirun<S extends ISession>( | |||
program: Command; | |||
getSession: (logger: Logger, opts?: SessionOpts) => S; | |||
}, | |||
runOptions?: { | |||
forceExit?: boolean | ((...args: any[]) => boolean); |
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.
Maybe we should flip this to have this be the default and then processes that need to hang (e.g. start/watch) can add work arounds.
@rowanc1 do we know which processes are hanging? For example, execution is supposed to ensure that everything is cleaned up. |
I have spent at least four hours trying to track in down to no avail over the last few weeks. Happy for someone else to take a look, but it is a pretty hard thing to find imo.... There were anywhere between 10-100 open promises at the end of the build function. for a Typst build. And it wasn't overly consistent. I think this hits the user's perceived problem. But for sure there are some things we need to clean up internally. |
Fixes hanging node process waiting on unresolved promises.
Fixes hanging node process waiting on unresolved promises.