-
Notifications
You must be signed in to change notification settings - Fork 191
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
fix(output): ignore stdio channels (stdout, stdin, stderr) #121
Conversation
@paulirish whenever you have the time 😄 |
tbh i can't reproduce the bug on mac or my ubuntu, but i don't see why this wouldn't work. @wardpeet did you repro it? |
yes I did but only in docker so I guess it has to do with docker piping all output to the docker logs command |
The modified line tries to parse the output of the executed command. |
Sorry what are you referring to? What does it break? |
The line modified by the commit 35842ba:
|
I'll create a fix |
aye. just tested this and looks like @vpracht is right. Thx very much for commenting! my repro: // log.js
process.stdout.write('STDOUT\n');
process.stderr.write('stderr\n'); // index.js
const {execFileSync} = require('child_process');
const output = execFileSync('node', ['log.js'], {encoding: 'utf-8', stdio: 'ignore'});
console.log({output}); node index.js
# { output: null } @wardpeet looks like |
yeah I just tested it in docker too and pipe works as well. The reason why I thought it wouldn't was because I thought the default was pipe as stated in the docs but I missed the following line
|
@vpracht fix is up #125 |
fixed in chrome-launcher@0.10.5 |
Add
{ stdio: 'ignore' }
to execFileSync to make sure no output is generated to our output buffers.fixes GoogleChrome/lighthouse#5795