Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

brunch watch does not check if stdin was closed #920

@josevalim

Description

@josevalim

I would like to automatically run brunch watch as part of my application but, when my application shuts down, the brunch process persists and continue running. I have observed that my application does close STDIN, however, brunch watch is not checking if STDIN was closed or not. Those two lines solve the issue:

process.stdin.on('end', function() { process.exit(0) });
process.stdin.resume();

I would love to send a pull request for this, the question is: should we always run this or should we make it opt-in?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions