Skip to content

Instantly share code, notes, and snippets.

@moul moul/node-spawn-stdio.js
Last active Aug 29, 2015

Embed
What would you like to do?
node-spawn-stdio.js
process.stdout.isTTY;
require('child_process').spawn('ssh', 'localhost -t -- bash'.split(' '), {stdio: 'inherit'});
@moul

This comment has been minimized.

Copy link
Owner Author

moul commented Apr 22, 2015

This code redirects:

  • stdin, stdout and stderr on node@0.10.29
  • but only stdin and stderr (no stdout) on node@0.12.0

if I remove process.stdout.isTTY, it works everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.