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

Is there any solution to pad the log info of spawn. #2

Open
popomore opened this issue May 21, 2015 · 1 comment
Open

Is there any solution to pad the log info of spawn. #2

popomore opened this issue May 21, 2015 · 1 comment

Comments

@popomore
Copy link

var padStdio = require('pad-stdio');

padStdio.stdout('prefix ');

require('child_process').spawn('npm', ['install'], {
  stdio: 'inherit'
});
@sindresorhus
Copy link
Owner

I would love to be wrong, but I don't think you can do anything to an inherited stdio.

Depending on your use-case you might be able to pipe the child process instead of inheriting:
https://github.com/sindresorhus/pad-stream#usage

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

No branches or pull requests

2 participants