I have the same question. But I can't use the this solution, is it possible to make the stream of spawned program mock as stdio.
I am interesting with how the CLI programs determine whether the stdout stream is support colors? Is it possible node "cheat the spawn" with the colors support like what a terminal does. 2011-12-31 1:40 GMT+08:00 Nathan Rajlich <[email protected]>: > You're welcome ;) > > > On Thu, Dec 29, 2011 at 8:02 PM, Prabir Shrestha <[email protected] > > wrote: > >> Answer at http://stackoverflow.com/a/8671997/157260 >> >> this code seems to preserve the color. >> >> var spawn = require('child_process').spawn >> , command = 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild >> c:\\test.sln' >> , cmd = spawn('cmd', ['/s', '/c', command], { customFds: [0,1,2] }); >> >> cmd.on('exit', function(code){ >> console.log(code); >> }); >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Best regards, 桂林 (Gui Lin) guileen@twitter <https://twitter.com/#!/guileen> 桂糊涂@weibo <http://weibo.com/guileen> guileen@github <https://github.com/guileen> -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
