Skip to content
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

Added the 'inherit' flag to replicate original's process output. #22

Merged
merged 2 commits into from
Aug 10, 2016
Merged

Added the 'inherit' flag to replicate original's process output. #22

merged 2 commits into from
Aug 10, 2016

Conversation

hectormenendez
Copy link
Contributor

No description provided.

@M-Zuber
Copy link
Owner

M-Zuber commented Aug 4, 2016

Thank you for this.
I just realized that I don't have what I need set up on this machine yet, so I may only be able to test/deploy on Sunday.

@@ -76,8 +78,9 @@ module.exports = function watchPackage (pkgDir, exit) {
var proc = processes[script] = spawn(nodemon, args, {
env: process.env,
cwd: pkgDir,
stdio: 'pipe'
stdio: inherit === true? 'inherit' : 'pipe'
Copy link
Owner

Choose a reason for hiding this comment

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

Can you test on a non-windows machine if you do this instead:
stdio: inherit === true? ['pipe', 'inherit', 'pipe'] : 'pipe'?
On windows inheriting the entire stdio causes any subsequent input to be overlaid on the previous output.

Copy link
Contributor Author

@hectormenendez hectormenendez Aug 10, 2016

Choose a reason for hiding this comment

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

Confirmed to work in both MacOS Sierra and ArchLinux (Linux 4.6.3-1-ec2). Both using Bash v4.3

Pushed commit to reflect these changes.

@M-Zuber
Copy link
Owner

M-Zuber commented Aug 10, 2016

👍
Thank you!

@M-Zuber M-Zuber merged commit 80aceb3 into M-Zuber:master Aug 10, 2016
@M-Zuber M-Zuber mentioned this pull request Aug 10, 2016
@hectormenendez
Copy link
Contributor Author

👍🏼

@domarmstrong
Copy link

This isn't working with the 'debug' module, stderr seems to have disappeared when using inherit. ['pipe', 'inherit', 'inherit'] (stdinn, stdout, stderr) works for me, I can't test on windows however.

@hectormenendez
Copy link
Contributor Author

You're absolutely right @domarmstrong. I just replicated it. I have a windows machine nearby, I'll check if your fix works ASAP.

@hectormenendez
Copy link
Contributor Author

hectormenendez commented Aug 11, 2016

I just pushed in my fork a fix. It's working for me in both Windows and MacOs. @domarmstrong could you verify it on your side? so I can make the PR.

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.

3 participants