Skip to content

It's possible for this package to cause a process.exit(0) #35

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

Open
kitsunde opened this issue Nov 10, 2022 · 0 comments
Open

It's possible for this package to cause a process.exit(0) #35

kitsunde opened this issue Nov 10, 2022 · 0 comments

Comments

@kitsunde
Copy link

I haven't dug deeply into the specifics of this issue since I'm replacing the library, and I'm pretty confident this project is no longer maintained, but I want to leave some information here.

Effectively in node 16 I have:

const { pipeline } = require('stream/promises');

await pipeline(
  procuder,
  async function*{},
  progressStream,
  otherStuff
)

The stream itself gets processed and upon completion results in the equivalent of process.exit(0), it will not continue even wrapped in try {} finally {} and will exit with status 0. The only way to capture the process before exiting seem to be by listening to beforeExit or exit on process.

If I swap the order so the progress stream is before the async generator, execution completes normally:

const { pipeline } = require('stream/promises');

await pipeline(
  procuder,
  progressStream,
  async function*{},
  otherStuff
)

I suspect it's related to this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant