-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
Thank you for this. |
@@ -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' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
👍 |
👍🏼 |
This isn't working with the 'debug' module, stderr seems to have disappeared when using inherit. |
You're absolutely right @domarmstrong. I just replicated it. I have a windows machine nearby, I'll check if your fix works ASAP. |
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. |
No description provided.