Skip to content

Instantly share code, notes, and snippets.

@Almad
Created October 25, 2012 21:08
Show Gist options
  • Save Almad/3955423 to your computer and use it in GitHub Desktop.
Save Almad/3955423 to your computer and use it in GitHub Desktop.
grunt spawn
grunt.util.spawn cmd: 'ls', args: ['./node_modules/.bin/nodemon'], (err, result, code) ->
console.error 'err', err
console.error 'result', result
console.error 'code', code
grunt.util.spawn cmd: './node_modules/.bin/nodemon', (err, result, code) ->
console.error 'err', err
console.error 'result', result
console.error 'code', code
@Almad
Copy link
Author

Almad commented Oct 25, 2012

err null
result { stdout: './node_modules/.bin/nodemon',
  stderr: '',
  code: 0,
  toString: [Function] }
code 0
err { stdout: '',
  stderr: 'Error: not found: ./node_modules/.bin/nodemon',
  code: 127,
  toString: [Function] }
result { stdout: '',
  stderr: 'Error: not found: ./node_modules/.bin/nodemon',
  code: 127,
  toString: [Function] }
code 127

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