Skip to content

Instantly share code, notes, and snippets.

@davglass
Created September 5, 2012 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davglass/3638530 to your computer and use it in GitHub Desktop.
Save davglass/3638530 to your computer and use it in GitHub Desktop.
Node.js child process on windows fails for node installed cli apps
#!/usr/bin/env node
var spawn = require('child_process').spawn;
var child = spawn('npm', ['show', 'yui']);
child.stdout.on('data', function(d) {
console.log(d + '');
});
child.stderr.on('data', function(d) {
console.log(d + '');
});
child.on('exit', function(code) {
console.log('child exited with code', code);
});
@brianswisher
Copy link

how would you modify this to use node-which?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment