Skip to content

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

@kitsunde

Description

@kitsunde

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions