Skip to content

Dev: Pipe stdin from parent to app process #823

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

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Conversation

RaeesBhatti
Copy link
Contributor

- Summary
Pipe stdin of parent process to stdin of spawned app process.
Ref: #818 (comment)

- Test plan

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Contributor

@ehmicky ehmicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work in most cases.

However one issue is that the child process stdin will not be considered a tty anymore (process.stdin.isTTY !== true inside child process). This creates many issues with terminal utilities.

The only fix for it is to use stdio: inherit instead of stdio: pipe.

@RaeesBhatti
Copy link
Contributor Author

RaeesBhatti commented Apr 13, 2020

We're actually hoping that child processes will not consider it a tty because that will prevents some frameworks from clearing the screen, which is problematic because it removes useful information logged by Netlify CLI. #374

@RaeesBhatti RaeesBhatti merged commit 2657da3 into master Apr 13, 2020
@RaeesBhatti RaeesBhatti deleted the raees/stdin-pipe branch April 13, 2020 14:39
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

Successfully merging this pull request may close these issues.

2 participants