node.js - How do I get non-ascii characters from child_process.stdout? -
i have node task spawns kid process , forwards process' output stdout:
var kid = require( 'child_process' ).spawn( 'some_cmd' ); child.stdout.on( 'data', process.stdout.write.bind( process.stdout ) ); this works fine except non-ascii characters, command characters text color, don't come through. text child_process white.
does have thought how prepare this? alternatively, know how show child_process output straight without bridging streams?
answering own question (though if has reply how read character command data, i'd still interested):
calling child_process.spawn stdio: 'inherit' passes stdout , stderr kid process, issue goes away.
require( 'child_process' ).spawn( 'cmd', { stdio: 'inherit' } ); node.js
No comments:
Post a Comment